summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-29 22:08:22 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:08 +0900
commitda2167088018e01c5e15cb1eda6ea370236e6a96 (patch)
treecf3a84df8994ed92010b92330590db0aabe57954 /player/main.c
parent2cac69f221e91a9e8eae6010cb92bae33a4587f2 (diff)
downloadmpv-da2167088018e01c5e15cb1eda6ea370236e6a96.tar.bz2
mpv-da2167088018e01c5e15cb1eda6ea370236e6a96.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.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/player/main.c b/player/main.c
index 6e8755cad7..d3be73c3db 100644
--- a/player/main.c
+++ b/player/main.c
@@ -457,15 +457,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");