From 159bc92e5e09358762e842e5089aaa73a799f70d Mon Sep 17 00:00:00 2001 From: NFL_jiancx <1678594309@qq.com> Date: Sun, 9 Feb 2025 16:53:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=9F=B3?= =?UTF-8?q?=E9=A2=91=E6=97=A0=E6=B3=95=E6=88=90=E5=8A=9F=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NFLmusic.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NFLmusic.py b/NFLmusic.py index 5212c08..2a2f8f4 100644 --- a/NFLmusic.py +++ b/NFLmusic.py @@ -1017,7 +1017,11 @@ def latter_song(): refresh() music_dir_with_path = [path + "/" + file for file in os.listdir(path) if file.endswith(('.mp3', '.flac', '.ogg', '.m4a'))] - if music_playing == song_list[-1]: + try: + last_song = song_list[-1] + except IndexError: + last_song = song_list[0] + if music_playing == last_song: if len(song_list) >= len(music_dir_with_path): del song_list[0] elif len(song_list) > song_list_limit: @@ -1147,7 +1151,7 @@ def download_version(): copy(version_json[get_treeview_index(version_list, version_download_choice)]["password"]) -version = "4.0.6" +version = "4.0.7" poem = "" appdata = os.getenv("APPDATA") make_resource()