From: Olaf Wintermann Date: Fri, 22 Nov 2024 19:56:52 +0000 (+0100) Subject: fix folder autoplay X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;ds=inline;p=uwplayer.git fix folder autoplay --- 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; }