diff --git a/music-api.py b/music-api.py index 04a2929..bb6226e 100755 --- a/music-api.py +++ b/music-api.py @@ -668,7 +668,7 @@ def worker(): # Repeat_one: loop the first track if repeat_mode == "repeat_one": with queue_lock: - current_track = queue[0] + current_track = queue[0] if queue else None path_current = os.path.join(MUSIC_DIR, current_track) set_rds(f"RT {current_track}") played_ok = stream_file(path_current) @@ -680,7 +680,7 @@ def worker(): # Normal / repeat_all with queue_lock: - current_track = queue[0] + current_track = queue[0] if queue else None path_current = os.path.join(MUSIC_DIR, current_track) set_rds(f"RT {current_track}")