diff options
author | wm4 <wm4@nowhere> | 2014-12-29 22:08:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-29 22:08:22 +0100 |
commit | 6618e5d69ab2f1eef70769e46f4129d13bd7ff29 (patch) | |
tree | ff20ad08cc4673073543fbd866a4fff2bc8478e6 /player/main.c | |
parent | 40755180113ac58cd98fb0f6758c1466e56d5f94 (diff) | |
download | mpv-6618e5d69ab2f1eef70769e46f4129d13bd7ff29.tar.bz2 mpv-6618e5d69ab2f1eef70769e46f4129d13bd7ff29.tar.xz |
player: make --shuffle/--merge-files affect runtime loaded playlists
Until now, these options took effect only at program start. This could
be confusing when e.g. doing "mpv list.m3u --shuffle". Make them always
take effect when a playlist is loaded either via a playlist file, or
with the "loadlist" command.
Diffstat (limited to 'player/main.c')
-rw-r--r-- | player/main.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/player/main.c b/player/main.c index 700dbfa48f..41a57981e4 100644 --- a/player/main.c +++ b/player/main.c @@ -467,15 +467,7 @@ int mp_initialize(struct MPContext *mpctx) mpctx->ipc_ctx = mp_init_ipc(mpctx->clients, mpctx->global); #endif - if (opts->shuffle) - playlist_shuffle(mpctx->playlist); - - if (opts->merge_files) - merge_playlist_files(mpctx->playlist); - - mpctx->playlist->current = mp_check_playlist_resume(mpctx, mpctx->playlist); - if (!mpctx->playlist->current) - mpctx->playlist->current = mpctx->playlist->first; + prepare_playlist(mpctx, mpctx->playlist); MP_STATS(mpctx, "end init"); |