Skip to content

Commit

Permalink
fix: Fix Can't get map issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed Sep 15, 2024
1 parent c091d7f commit b9106dd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/tosu/src/entities/BeatmapPpData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,19 @@ export class BeatmapPPData extends AbstractEntity {
this.PerformanceAttributes.free();
} catch (error) {
wLogger.debug(
`BPPD(updateMapMetadata) Can't get map: ${mapPath}`,
error
`BPPD(updateMapMetadata) Can't get map`,
{
mapPath,
currentMods,
currentMode
},
(error as Error).stack
);
return 'not-ready';
}

this.beatmap = new rosu.Beatmap(this.beatmapContent);
if (this.beatmap.mode !== currentMode)
if (this.beatmap.mode === 0 && this.beatmap.mode !== currentMode)
this.beatmap.convert(currentMode);

const beatmapCheckTime = performance.now();
Expand Down

0 comments on commit b9106dd

Please sign in to comment.