Reset the list sequence index if we can't find the next track.
authorNot Zed <notzed@gmail.com>
Thu, 25 May 2023 23:40:07 +0000 (09:10 +0930)
committerNot Zed <notzed@gmail.com>
Thu, 25 May 2023 23:40:07 +0000 (09:10 +0930)
music-player.c

index 0d7fc78..d4429ec 100644 (file)
@@ -813,7 +813,8 @@ int audio_restore_state(struct audio_player *ap) {
                res = -1;
                printf("unable to restore state\n");
                // ??
-               //ap->playing_state.listid = 1;
+               ap->playing_state.listid = 1;
+               ap->playing_state.seq = 0;
        }
 
        dbindex_commit(tx);