aliencaocao / netease_cloudmusic_discord_rpc Goto Github PK
View Code? Open in Web Editor NEW网易云音乐Discord听歌状态同步
License: GNU Affero General Public License v3.0
网易云音乐Discord听歌状态同步
License: GNU Affero General Public License v3.0
After restarting Discord, update will fail with an InvalidID
exception. The traceback is as follows.
File "...\pypresence\baseclient.py", line 81, in read_output
preamble = await self.sock_reader.read(8)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [WinError 232] The pipe has been ended.
During handling of the above exception, another exception occurred:
File "...\pypresence\baseclient.py", line 85, in read_output
raise InvalidID
File "...\pypresence\presence.py", line 34, in update
return self.loop.run_until_complete(self.read_output())
File "...\main.py", line 227, in update
RPC.update(pid=pid,
File "...\main.py", line 47, in _target
self.function()
pypresence.exceptions.InvalidID: Client ID is Invalid
This is clearly pypresence's bug (see #213), and we'll have to wait for pypresence to fix this.
Below is a temporary fix.
try:
RPC.update(state="test") # InvalidID after Discord restart
except InvalidID:
print("Reconnecting")
RPC.connect() # RuntimeError: There is no current event loop in thread 'Thread-1 (_target)'.
Then we run into the second bug: RuntimeError: There is no current event loop in thread 'Thread-1 (_target)'.
It happened when Presence
tries to renew the event loop in connect()
, but fails to handle the exception when it can't find a existing one.
This bug is fixed in #210, which has been waiting for approval for two weeks.
Netease just released a new beta client V3.0.0 build 201589 x64. I have found the offset total length but cant find the sound array within the whole cloudmusic.dll memory (using cheat engine full memory scan with unicode ticked). There are many instances of the song id in the entire scope (main exe+all DLLs) but I can't find one that reliably gives the song id. Most of them seem to partially give with 1 byte off (set to 0x00 when it should be in ASCII e.g. 0x30 onwards). I need some help with scanning the song array.
Besides, the current offset also cant be found. All those I found seem to be static, they don't update as the song plays. I think they upgraded their anti-debugging feature.
Tagging original contributor of song array feature @lekoOwO and RE expert @twinklestar03
Originally posted by JdumB October 24, 2023
TLDR of discussion: V0.2.8 works, V0.3.0 does not work for client V2.10.11. To test on client V2.10.12.
This line is somehow causing issue as it is not outputting the version.txt to the working dir, causing subsequent pyinstall build to fail.
EDIT: see comment below. the file is there but pyinstaller complains is not there. I cannot reproduce this issue locally.
This issue does not affect the functionality of the code. Users can still build their own binaries or download the prebuilt exes from releases page.
Originally posted by chenchen7427 May 7, 2024
一个小建议 就是不知道能不能实现比如半个小时没有播放音乐 就取消discord上网易云的状态
Originally posted by chenchen7427 April 19, 2024
想问下该怎么开机自动启动呀
在我使用UAC启动后,显示了“从服务返回了一个参照”
It seems like V3.0 added address randomisation causing the pointer offsets to be random on each machine. Code for reading them already works IF the randomisation can be solved. E.g., offsets found are only valid for that session.
Waiting for V3.0 to stabilize then try to find another way to read song id.
When the album name is only one character long (e.g. 𠷡), the program throws the following exception
Child "activity" fails because child "assets" fails because child "large_text" fails because "large_text" length must be at least 2 characters long
This can be solved by adding spaces to the album name, they get removed on the webpage anyway.
Music status is not displayed, and music progress is constantly updated even when music is paused
Music status (Playing or Paused) is displayed in a small icon at the corner of the album art, and music progress is hidden when music is paused
Note that the small icon should be replaced with a play / pause icon, but I haven't found them yet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.