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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user