Record the phase 5 ScoreSaber merge and map OST hashes in the sync

ScoreSaber names official levels "ost_<LevelId>" where BeatLeader uses
"<levelid>"; ssMapHash applies that for leaderboard snapshots and maps.
The plan records the merge results and where it differs from the steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 14:49:55 -08:00
co-authored by Claude Opus 5.5
parent efaa2373dc
commit d0d746ec7f
3 changed files with 63 additions and 4 deletions
+9 -1
View File
@@ -102,6 +102,14 @@ function seedFromScraper(playerId: string, items: SSItem[]): void {
if (copied) console.log(` copied ${copied} replays from ${dir}`);
}
/**
* The map hash BeatLeader and the archive use for a ScoreSaber item: lowercase, and for official
* levels the level id without ScoreSaber's "ost_" prefix (BeatLeader: "beatsaber", SS: "ost_BeatSaber").
*/
export function ssMapHash(it: SSItem): string {
return it.leaderboard.songHash.toLowerCase().replace(/^ost_/, '');
}
export function ssHashes(playerId: string, sinceUnix = 0): string[] {
return [...new Set(archivedSSScores(playerId, sinceUnix).map((it) => it.leaderboard.songHash.toLowerCase()))].sort();
return [...new Set(archivedSSScores(playerId, sinceUnix).map(ssMapHash))].sort();
}