From 75a8ab30910153f319f008365364a53b871ef6b0 Mon Sep 17 00:00:00 2001 From: NFL_jiancx <1678594309@qq.com> Date: Sun, 4 May 2025 16:40:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(music):=20=E4=BF=AE=E5=A4=8D=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=AD=8C=E6=9B=B2=E6=97=B6=E7=9A=84=E6=9D=83=E9=99=90?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在删除歌曲时,如果遇到 PermissionError,调用新的 stopmusic() 函数停止音乐播放 - 成功删除歌曲后,更新音乐播放状态- 更新软件版本号至 4.2.5 --- NFLmusic.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/NFLmusic.py b/NFLmusic.py index 3c8dfce..5c4a474 100644 --- a/NFLmusic.py +++ b/NFLmusic.py @@ -438,7 +438,7 @@ def delete(): message=lang.get(la, "mbox.text.delete_fail_no_target", )) except PermissionError: try: - music_player.stop_music() + stopmusic() os.remove(abs_path) try: os.remove(abs_path_lrc) @@ -518,6 +518,12 @@ def playmusic(music_path): pass +def stopmusic(): + global music_playing + music_playing = "" + music_player.stop_music() + + def restart0(): root.destroy() python = sys.executable @@ -1325,7 +1331,7 @@ def search_local_song(): time.sleep(1) -version = "4.2.4" +version = "4.2.5" poem = "" appdata = os.getenv("APPDATA") make_resource()