From cb2e784c075bed1a3220cf46dc072171f4f632e5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 May 2014 21:28:20 +0200 Subject: 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. --- player/command.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'player/command.c') 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: { -- cgit v1.2.3