summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-22 21:28:20 +0200
committerwm4 <wm4@nowhere>2014-05-22 21:28:20 +0200
commitcb2e784c075bed1a3220cf46dc072171f4f632e5 (patch)
tree7af1a7d821fd092d29fba55293ee86c1adf996da /player/command.c
parentaca4f9f474bfc7d3775a68d4838b0263e27c377b (diff)
downloadmpv-cb2e784c075bed1a3220cf46dc072171f4f632e5.tar.bz2
mpv-cb2e784c075bed1a3220cf46dc072171f4f632e5.tar.xz
player: give quit_watch_later an exit code argument like quit
The quit command has an optional argument that is used as exit code. Extend that to the quit_watch_later command. Actually, unify the implementations of the two commands. Requested in #798.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/player/command.c b/player/command.c
index 5e09079866..be5d215300 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3242,17 +3242,14 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
case MP_CMD_QUIT:
+ case MP_CMD_QUIT_WATCH_LATER:
+ if (cmd->id == MP_CMD_QUIT_WATCH_LATER)
+ mp_write_watch_later_conf(mpctx);
mpctx->stop_play = PT_QUIT;
mpctx->quit_custom_rc = cmd->args[0].v.i;
mpctx->has_quit_custom_rc = true;
break;
- case MP_CMD_QUIT_WATCH_LATER:
- mp_write_watch_later_conf(mpctx);
- mpctx->stop_play = PT_QUIT;
- mpctx->quit_player_rc = 0;
- break;
-
case MP_CMD_PLAYLIST_NEXT:
case MP_CMD_PLAYLIST_PREV:
{