diff options
author | wm4 <wm4@nowhere> | 2013-08-19 00:50:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-19 01:05:49 +0200 |
commit | 4579cce768d0c9c84dc5f318b7189ffb03b49ece (patch) | |
tree | 86ddbbbeb92e4e0c78e72d9d393c27c91dcc9580 /mpvcore/parser-mpcmd.c | |
parent | 2508f38a92f8863cfc156b2b7310512863db7d4e (diff) | |
download | mpv-4579cce768d0c9c84dc5f318b7189ffb03b49ece.tar.bz2 mpv-4579cce768d0c9c84dc5f318b7189ffb03b49ece.tar.xz |
mplayer: reshuffle on every loop if --loop and --shuffle are used
See github issue #194.
Unfortunately, this breaks the property that going back in the playlist
always works as expected. This changes, because the playlist_prev
command will work on the reshuffled playlist, instead of loading the
previously played files in order. If this ever becomes an issue, I
might revert this commit.
Diffstat (limited to 'mpvcore/parser-mpcmd.c')
-rw-r--r-- | mpvcore/parser-mpcmd.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mpvcore/parser-mpcmd.c b/mpvcore/parser-mpcmd.c index 9b9d175cf7..55615d950e 100644 --- a/mpvcore/parser-mpcmd.c +++ b/mpvcore/parser-mpcmd.c @@ -110,14 +110,6 @@ static bool split_opt(struct parse_state *p) return false; } -static bool parse_flag(bstr name, bstr f) -{ - struct m_option opt = {NULL, NULL, CONF_TYPE_FLAG, 0, 0, 1, NULL}; - int val = 0; - m_option_parse(&opt, name, f, &val); - return !!val; -} - // returns M_OPT_... error code int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, int argc, char **argv) @@ -125,7 +117,6 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, int ret = M_OPT_UNKNOWN; int mode = 0; struct playlist_entry *local_start = NULL; - bool shuffle = false; int local_params_count = 0; struct playlist_param *local_params = 0; @@ -190,16 +181,6 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, mode = GLOBAL; m_config_restore_backups(config); local_start = NULL; - shuffle = false; - continue; - } - - if (bstrcmp0(p.arg, "shuffle") == 0) { - shuffle = parse_flag(p.arg, p.param); - continue; - } - if (bstrcmp0(p.arg, "no-shuffle") == 0) { - shuffle = false; continue; } @@ -274,9 +255,6 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, goto err_out; } - if (shuffle) - playlist_shuffle(files); - ret = 0; // success err_out: |