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()