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

疑似名称过长报错 #38

Open
ModChino opened this issue Nov 27, 2024 · 6 comments
Open

疑似名称过长报错 #38

ModChino opened this issue Nov 27, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ModChino
Copy link

ModChino commented Nov 27, 2024

image
image
image

@Kxnrl Kxnrl added the bug Something isn't working label Dec 2, 2024
@Kxnrl
Copy link
Owner

Kxnrl commented Dec 2, 2024

截图一下网易云的版本号

@ModChino
Copy link
Author

ModChino commented Dec 2, 2024

QQ音乐
image

@Kxnrl
Copy link
Owner

Kxnrl commented Dec 11, 2024

更新QQ音乐到20.40+还会有这个问题吗

@ModChino
Copy link
Author

更新QQ音乐到20.40+还会有这个问题吗

会的
image

@jhqwqmc
Copy link

jhqwqmc commented Dec 12, 2024

我这边也遇到了这个问题,在播放下面的歌曲的时候触发了这个问题

歌曲名:Call of Silence,歌手名:澤野弘之 (さわの ひろゆき),专辑名:TVアニメ「進撃の巨人」Season 2 オリジナルサウンドトラック 音楽:澤野弘之 (进击的巨人 第二季 动画原声带)

image
观察了下感觉有点奇怪,部分歌曲不会报错但是discord那边不能正常更新动态,有些会报错,有些是正常的,目前没观察出什么规律,但感觉和显示的字是否包含非ASCII字符有关系

kriYamiHikari added a commit to kriYamiHikari/NetEase-Cloud-Music-DiscordRPC that referenced this issue Dec 15, 2024
- Added string truncation to handle text overflow and prevent crashes.
- Fixed a bug where text longer than 128 bytes would cause the program to crash or behave unexpectedly.
- Ensured that all text sent to DiscordRPC is truncated to the 128-byte limit.
@kriYamiHikari
Copy link

实际是因为 Discord RPC 的文本最高只能支持到 128 个字节,QQ 音乐的部分歌曲歌手或专辑名特别长,以至于超过了 128 个字节引发报错,例如下面这两首:

歌手超长:明天会更好
专辑超长:悲しみはオーロラに

不知道有没有歌曲名特别长的歌曲,理论来说歌曲名、歌手名、专辑名三者任意一个超长就会引发错误。

解决方法是针对超长部分直接截断,并在后续加入省略号 (...) 来始终限制文本在128个字节以内,就可以解决这个问题了。

新的一个 Commit d3b77c6 修改了 QQ 音乐的信息获取方式,20.43 以下的版本可能会引发错误,需要将 QQ 音乐升级到最新版 (20.47) 。(已知 20.31 版本会引发错误)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants