Skip to content

Commit 4a50ccc

Browse files
committed
fix: toFixed 定数报错
1 parent 5c73645 commit 4a50ccc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/botcore/src/utils/LyricsHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Lyrics = {
1515

1616
const WIKI_URL = 'https://silentblue.remywiki.com';
1717
const WIKI_NAME = 'SilentBlue Wiki';
18-
const NETEASE_API = 'https://neteasecloudmusicapi.vercel.app';
18+
const NETEASE_API = 'https://api-mymusic.vercel.app';
1919

2020
export default class LyricsHelper {
2121
private readonly geniusClient: Genius.Client;

packages/types/src/Chart.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class Chart implements Sheet {
3636
this.internalLevelValue = level145;
3737
}
3838
if (level150 && ver === 150) {
39-
this.internalLevelValue = level145;
39+
this.internalLevelValue = level150;
4040
}
4141
const valueFromAllMusic = dataFromAllMusic?.notes[LEVEL_EN.indexOf(data.difficulty)]?.lv;
4242
if (this.regions && !Object.values(this.regions).some(Boolean)) {
@@ -49,6 +49,9 @@ export default class Chart implements Sheet {
4949
if (!this.internalLevelValue && valueFromAllMusic) {
5050
this.internalLevelValue = valueFromAllMusic;
5151
}
52+
if (!this.internalLevelValue) {
53+
this.internalLevelValue = 0;
54+
}
5255
// if (this.internalLevelValue !== valueFromAllMusic) {
5356
// console.log('发现了定数错误', dataFromAllMusic?.name, data.type, data.difficulty, '来自 DXRating.net 的定数:', data.internalLevelValue, '来自 all-music.json 的定数:', valueFromAllMusic);
5457
// }

0 commit comments

Comments
 (0)