With this combination of options, the playlist is shuffled every time the last playlist is reached, instead of when restarting from the first playlist entry. Abort prefetching in this case, as we can't predict which file to prefetch until the playlist is shuffled when actually going to the first file again.
Unified · Split
| @@ -1939,8 +1939,11 @@ struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction, · 1938 unmodified lines | ||
| 1939 | 1939 | next->playlist_prev_attempt = true; |
| 1940 | 1940 | if (!next && mpctx->opts->loop_times != 1) { |
| 1941 | 1941 | if (direction > 0) { |
| 1942 | − if (mpctx->opts->shuffle) | |
| 1942 | + if (mpctx->opts->shuffle) { | |
| 1943 | + if (!update_loop) | |
| 1944 | + return NULL; | |
| 1943 | 1945 | playlist_shuffle(mpctx->playlist); |
| 1946 | + } | |
| 1944 | 1947 | next = playlist_get_first(mpctx->playlist); |
| 1945 | 1948 | if (next && mpctx->opts->loop_times > 1 && update_loop) { |
| 1946 | 1949 | mpctx->opts->loop_times--; |