]> uap-core.de Git - uwplayer.git/commitdiff
fix folder autoplay default
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Fri, 22 Nov 2024 19:56:52 +0000 (20:56 +0100)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Fri, 22 Nov 2024 19:56:52 +0000 (20:56 +0100)
application/player.c
application/playlist.c

index a2b522d841cb9d7cb006dd98e76c63985f475b58..bed65677945a6f739cb5eae2a26949555bcded04 100644 (file)
@@ -305,7 +305,7 @@ static void player_io(Player *p) {
                 break;
             }
             //fwrite(buf, 1, r, stdout);
-            fflush(stdout);
+            //fflush(stdout);
             json_parser_fill(js, buf, r);
             
             JSONValue *value;
index 89c276bd9a9a18bc3f60c83c29492757560bed02..206c079a08f0cd60a03269c31e25dfd99c95ad23 100644 (file)
@@ -53,12 +53,12 @@ void PlayListPlayNext(MainWindow *win, bool force) {
         }
     } else if(win->playlist.random) {
         current = random() % len;
-    } else if(current < len) {
-        current++;
     } else if(win->playlist.autoplayFolder) {
         char *next_file = util_find_next_file(win->file);
         cxListAdd(win->playlist.tracks, next_file);
         current = len;
+    } else if(current+1 < len) {
+        current++;
     } else {
         current = 0;
     }