From 9b9282b0c8d14da749844af2264448bfe987618b Mon Sep 17 00:00:00 2001 From: NFL_jiancx <1678594309@qq.com> Date: Sun, 4 May 2025 17:32:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(NFLmusic):=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=20IndexError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复了删除歌曲时可能出现的 IndexError异常 - 更新了列表框中歌曲的删除逻辑 -将软件版本号从 4.2.5 升级到4.2.6 --- NFLmusic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NFLmusic.py b/NFLmusic.py index 5c4a474..cd32b92 100644 --- a/NFLmusic.py +++ b/NFLmusic.py @@ -430,7 +430,7 @@ def delete(): os.remove(abs_path_lrc) except: pass - music_dir_without_endswith.remove(filtered_list[listbox1.curselection()[0]]) + music_dir_without_endswith.remove(listbox1.get(0, END)[listbox1.curselection()[0]]) music_dir.remove(music_dir[listbox1.curselection()[0]]) listbox1.delete(listbox1.curselection()[0]) except IndexError: @@ -1331,7 +1331,7 @@ def search_local_song(): time.sleep(1) -version = "4.2.5" +version = "4.2.6" poem = "" appdata = os.getenv("APPDATA") make_resource()