diff options
author | wm4 <wm4@nowhere> | 2014-05-22 21:28:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-22 21:28:20 +0200 |
commit | cb2e784c075bed1a3220cf46dc072171f4f632e5 (patch) | |
tree | 7af1a7d821fd092d29fba55293ee86c1adf996da /player/command.c | |
parent | aca4f9f474bfc7d3775a68d4838b0263e27c377b (diff) | |
download | mpv-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.c | 9 |
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: { |