diff options
author | wm4 <wm4@nowhere> | 2013-02-03 14:54:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-02-03 16:52:48 +0100 |
commit | 5f28c34962fbbfa7e299c12565b4e5fba9bb21e4 (patch) | |
tree | 0072ac6529bc26687746279a809461cda6f538c2 /core/command.c | |
parent | 3b37fadc5dedae742cf7d9db69c9656b596d8a7c (diff) | |
download | mpv-5f28c34962fbbfa7e299c12565b4e5fba9bb21e4.tar.bz2 mpv-5f28c34962fbbfa7e299c12565b4e5fba9bb21e4.tar.xz |
mplayer: make advancing the playlist respect looping
Explicitly advancing the playlist with input commands ("playlist_next")
didn't jump back to the first file, if the current file was the last on
the playlist and looping was enabled.
Fix this and make the behavior with explicit input and playback EOF the
same.
Also add a minor feature: if looping is enabled, and the current file is
the first on the playlist, going back one entry jumps to the last
playlist entry (without changing loop count).
Fixes #22.
Diffstat (limited to 'core/command.c')
-rw-r--r-- | core/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/command.c b/core/command.c index bad1543224..8331278148 100644 --- a/core/command.c +++ b/core/command.c @@ -1871,7 +1871,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) int dir = cmd->id == MP_CMD_PLAYLIST_PREV ? -1 : +1; int force = cmd->args[0].v.i; - struct playlist_entry *e = playlist_get_next(mpctx->playlist, dir); + struct playlist_entry *e = mp_next_file(mpctx, dir); if (!e && !force) break; mpctx->playlist->current = e; |