diff options
author | wm4 <wm4@nowhere> | 2013-11-28 19:13:48 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-28 19:13:48 +0100 |
commit | 0a18f3eb9a163b1cd656129dac6164d7914ecc41 (patch) | |
tree | 351b5a74c9a4885e8adc493a81451aa91c018510 /mpvcore/player | |
parent | 5318a1bea1e477033cd355e19be366f0504222e9 (diff) | |
download | mpv-0a18f3eb9a163b1cd656129dac6164d7914ecc41.tar.bz2 mpv-0a18f3eb9a163b1cd656129dac6164d7914ecc41.tar.xz |
command: allow "current" as argument to playlist_remove command
Feature request from github issue #376.
Diffstat (limited to 'mpvcore/player')
-rw-r--r-- | mpvcore/player/command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mpvcore/player/command.c b/mpvcore/player/command.c index c2db56444e..f6aa429b99 100644 --- a/mpvcore/player/command.c +++ b/mpvcore/player/command.c @@ -2701,6 +2701,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) case MP_CMD_PLAYLIST_REMOVE: { struct playlist_entry *e = playlist_entry_from_index(mpctx->playlist, cmd->args[0].v.i); + if (cmd->args[0].v.i < 0) + e = mpctx->playlist->current; if (e) { // Can't play a removed entry if (mpctx->playlist->current == e) |