Skip to content

Commit 68abf5a

Browse files
committed
修复歌曲查找条件问题
1 parent 9cb27aa commit 68abf5a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/clients/src/UserProfile.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,11 @@ export class UserProfile {
147147
const convertedList = [] as number[];
148148
for (const music of musicIdList) {
149149
if (music instanceof Song) {
150-
const std = music.sheets.find(it => it.type === 'std');
151-
const dx = music.sheets.find(it => it.type === 'dx');
152-
std?.internalId && convertedList.push(std.internalId);
153-
dx?.internalId && convertedList.push(dx.internalId);
150+
convertedList.push(music.id % 1e4);
151+
convertedList.push(music.id % 1e4 + 1e4);
154152
} else {
155-
convertedList.push(music);
153+
convertedList.push(music % 1e4);
154+
convertedList.push(music % 1e4 + 1e4);
156155
}
157156
}
158157
return this.client.getUserMusic(this.userId, convertedList);

packages/types/src/Chart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default class Chart implements Sheet {
4343
this.internalLevelValue = level155;
4444
}
4545
const valueFromAllMusic = dataFromAllMusic?.notes[LEVEL_EN.indexOf(data.difficulty)]?.lv;
46-
if (this.regions && !Object.values(this.regions).some(Boolean)) {
46+
if (this.regions && !Object.values(this.regions).some(Boolean) && valueFromAllMusic) {
4747
// 删除曲
4848
this.internalLevelValue = valueFromAllMusic;
4949
}

0 commit comments

Comments
 (0)