From ec5505760eb027f7be1eea7335ac286688ac11c9 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Fri, 22 Nov 2024 20:56:52 +0100 Subject: [PATCH] fix folder autoplay --- application/player.c | 2 +- application/playlist.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/player.c b/application/player.c index a2b522d..bed6567 100644 --- a/application/player.c +++ b/application/player.c @@ -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; diff --git a/application/playlist.c b/application/playlist.c index 89c276b..206c079 100644 --- a/application/playlist.c +++ b/application/playlist.c @@ -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; } -- 2.43.5