mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57:19 +02:00
Fix problem with "|" character in game title
This commit is contained in:
parent
8d44dab04d
commit
e952bf07c8
@ -26,7 +26,7 @@ import { BxLogger } from "@utils/bx-logger";
|
||||
import { GameBar } from "./modules/game-bar/game-bar";
|
||||
import { Screenshot } from "./utils/screenshot";
|
||||
import { NativeMkbHandler } from "./modules/mkb/native-mkb-handler";
|
||||
import { GuideMenu, GuideMenuTab } from "./modules/ui/guide-menu";
|
||||
import { GuideMenu } from "./modules/ui/guide-menu";
|
||||
import { updateVideoPlayer } from "./modules/stream/stream-settings-utils";
|
||||
import { UiSection } from "./enums/ui-sections";
|
||||
import { HeaderSection } from "./modules/ui/header";
|
||||
@ -40,7 +40,6 @@ import { SettingsNavigationDialog } from "./modules/ui/dialog/settings-dialog";
|
||||
import { StreamUiHandler } from "./modules/stream/stream-ui";
|
||||
import { UserAgent } from "./utils/user-agent";
|
||||
import { XboxApi } from "./utils/xbox-api";
|
||||
import { TrueAchievements } from "./utils/true-achievements";
|
||||
|
||||
|
||||
// Handle login page
|
||||
|
@ -29,7 +29,7 @@ export class ProductDetailsPage {
|
||||
return;
|
||||
}
|
||||
|
||||
const titleSlug = matches.groups.titleSlug;
|
||||
const titleSlug = matches.groups.titleSlug.replaceAll('\%' + '7C', '-');
|
||||
const productId = matches.groups.productId;
|
||||
AppInterface.downloadWallpapers(titleSlug, productId);
|
||||
} catch (e) {}
|
||||
|
@ -113,6 +113,7 @@ export async function copyToClipboard(text: string, showToast=true): Promise<boo
|
||||
|
||||
export function productTitleToSlug(title: string): string {
|
||||
return title.replace(/[;,/?:@&=+_`~$%#^*()!^\u2122\xae\xa9]/g, '')
|
||||
.replace(/\|/g, '-')
|
||||
.replace(/ {2,}/g, ' ')
|
||||
.trim()
|
||||
.substr(0, 50)
|
||||
|
Loading…
x
Reference in New Issue
Block a user