fix: remove level from FormatDifficultySearch (#1652)

* fix: remove level from FormatDifficultySearch

* nullable for a reason
This commit is contained in:
nairobi
2026-06-08 19:22:34 +01:00
committed by GitHub
parent 3e9b80c618
commit d5aa746868
+16 -1
View File
@@ -108,7 +108,22 @@ function FormatDifficultyInternal(chart: ChartDocument, short: boolean): string
* Formats a chart's difficulty for searching, such as forwarding this query to youtube.
*/
export function FormatDifficultySearch(chart: ChartDocument): string | null {
return FormatDifficultyLong(chart);
const gameGroup = GameToGameGroup(chart.game);
const gameConfig = GetGameConfig(chart.game);
if (["bms", "itg", "pms"].includes(gameGroup)) {
return null;
}
let diff: string | undefined;
if (
gameConfig.difficulties.type === "FIXED" ||
gameConfig.difficulties.type === "CHUGEKIMAI_STYLE"
) {
diff = gameConfig.difficulties.formatLong[chart.difficulty];
}
diff ??= chart.difficulty;
return diff.trim();
}
export function FormatGame(game: V3Game): string {