Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix plate version sort #14

Closed
wants to merge 1 commit into from
Closed

fix plate version sort #14

wants to merge 1 commit into from

Conversation

esterTion
Copy link

「服务器输出排序能不能把str转一下int」

@Diving-Fish
Copy link
Owner

属于是历史遗留问题了

@Diving-Fish
Copy link
Owner

修了一下,现在服务器返回的id是按照数字顺序排列的了。因为有好多bot在用str格式的id,如果改的话估计会出毛病(
其实直接 this.music_data.sort((a, b) => (parseInt(a.id) - parseInt(b.id)))或许也可以?

@Diving-Fish Diving-Fish closed this Sep 6, 2021
@esterTion
Copy link
Author

草,我刚刷新看api改好了准备关(
排序弄好问题应该就不大了,类型报错确实

@Diving-Fish
Copy link
Owner

不过有一个小小的问题。【コネクト】DX谱面是 dx plus版本的乐曲,但是由于【コネクト】标准谱面的 id 非常小(初代歌),而拥有标准谱的 dx 谱 id 是直接 +10000 的,导致它的 id 在所有 dx 谱的最前面,因此会出现 dx plus 排序在 plus 之前的问题

@esterTion
Copy link
Author

这个确实……不过至少比之前一团乱好多了
真强迫就加个version表,现状来说牌子表也不符合dx和dx2021曲目表的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants