]> uap-core.de Git - uwplayer.git/commitdiff
fix broken Repeat List playback
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 7 Aug 2025 19:24:19 +0000 (21:24 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 7 Aug 2025 19:24:19 +0000 (21:24 +0200)
application/playlist.c

index 17de3d59d24b9da3d1e7dc6a46566db22c7b171f..b5e2de4ba4219736cb619057b163b1818742a2ee 100644 (file)
@@ -49,8 +49,11 @@ void PlayListPlayNext(MainWindow *win, bool force) {
     int current = win->playlist.current_track;
     switch(win->playlist.playback) {
         default: {
-            current = 0;
-            break;
+            if(current+1 < cxListSize(win->playlist.tracks)) {
+                current++;
+                break;
+            }
+            return;
         }
         case PLAYBACK_REPEAT: {
             if(force) {
@@ -59,7 +62,12 @@ void PlayListPlayNext(MainWindow *win, bool force) {
             break;
         }
         case PLAYBACK_REPEAT_LIST: {
-            return;
+            if(current+1 == cxListSize(win->playlist.tracks)) {
+                current = 0;
+            } else {
+                current++;
+            }
+            break;
         }
         case PLAYBACK_RANDOM: {
             current = random() % len;