Skip to content

Commit

Permalink
Support 2.10.10 build 201297
Browse files Browse the repository at this point in the history
Switch to catching pypresence base exception in main loop
  • Loading branch information
aliencaocao committed Jun 1, 2023
1 parent d6ff628 commit 74b0264
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Written in pure Python, supports latest versions of NetEase Cloud Music. Current
* 2.10.7 build 200847
* 2.10.8 build 200945
* 2.10.10 build 201117
* 2.10.10 build 201297

还会继续支持未来的新版本。

Expand All @@ -29,6 +30,7 @@ Currently supported versions:
* 2.10.7 build 200847
* 2.10.8 build 200945
* 2.10.10 build 201117
* 2.10.10 build 201297

Support for future versions will be added.

Expand Down
21 changes: 11 additions & 10 deletions scanning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"metadata": {
"collapsed": true,
"ExecuteTime": {
"start_time": "2023-04-22T10:04:13.452175Z",
"end_time": "2023-04-22T10:04:13.647320Z"
"end_time": "2023-06-01T13:17:14.371582Z",
"start_time": "2023-06-01T13:17:14.101582900Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -35,8 +35,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-04-22T10:04:13.646295Z",
"end_time": "2023-04-22T10:04:13.692753Z"
"end_time": "2023-06-01T13:17:14.416582900Z",
"start_time": "2023-06-01T13:17:14.372583Z"
}
},
"outputs": [],
Expand All @@ -51,22 +51,23 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-04-22T10:08:53.381381Z",
"end_time": "2023-04-22T10:09:29.931530Z"
"end_time": "2023-06-01T13:18:28.562982Z",
"start_time": "2023-06-01T13:18:03.295993500Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"found current at 0xa74570: 55.765\n",
"found song array offset at 0xb24f28: 1458767558\n",
"found length at 0xb25d18: 255.24\n"
"found current at 0xa79580: 55.561\n",
"found song array offset at 0xb2ad10: 1458767558\n",
"found length at 0xb2baf8: 255.24\n",
"found length at 0xbdf8b8: 255.27533486943685\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion scanning.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
play 爱你没错 by 雷小宝 and run the brute force scirpt in scanning.ipynb
play 爱你没错 by 雷小宝 and run the brute force script in scanning.ipynb
7 changes: 4 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import wmi
from pyMeow import close_process, get_module, get_process_name, open_process, pid_exists, r_bytes, r_float64, r_uint
from pyncm import apis
from pypresence import InvalidID, Presence
from pypresence import Presence, PyPresenceException
from win32api import GetFileVersionInfo, HIWORD, LOWORD

__version__ = '0.2.6'
Expand All @@ -24,7 +24,8 @@
'2.10.6.3993': {'current': 0xA65568, 'song_array': 0xB15654},
'2.10.7.4239': {'current': 0xA66568, 'song_array': 0xB16974},
'2.10.8.4337': {'current': 0xA74570, 'song_array': 0xB24F28},
'2.10.10.4509': {'current': 0xA77580, 'song_array': 0xB282CC}}
'2.10.10.4509': {'current': 0xA77580, 'song_array': 0xB282CC},
'2.10.10.4689': {'current': 0xA79580, 'song_array': 0xB2AD10}}
interval = 1

# regexes
Expand Down Expand Up @@ -232,7 +233,7 @@ def update():
small_text="Playing" if status != Status.paused else "Paused",
start=int(time.time() - current_float) if status != Status.paused else None,
buttons=[{"label": "Listen on Netease", "url": f"https://music.163.com/#/song?id={song_id}"}])
except InvalidID:
except PyPresenceException:
asyncio.set_event_loop(asyncio.new_event_loop())
RPC.connect()
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion src/version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version: 0.2.6.0
Version: 0.2.7.0
CompanyName: aliencaocao
FileDescription: Netease Cloudmusic Discord RPC
InternalName: Netease Cloudmusic Discord RPC
Expand Down

0 comments on commit 74b0264

Please sign in to comment.