From f93419f6b223546d36580ad37ca2644c0c4bb971 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Oct 2014 14:44:22 +0200 Subject: player: --save-position-on-quit should always work (2) This reimplements the feature reverted in the previous commit in a different way. --- player/command.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 758a62a8d9..f0d96bd509 100644 --- a/player/command.c +++ b/player/command.c @@ -3663,7 +3663,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) case MP_CMD_QUIT: case MP_CMD_QUIT_WATCH_LATER: - if (cmd->id == MP_CMD_QUIT_WATCH_LATER) + if (cmd->id == MP_CMD_QUIT_WATCH_LATER || opts->position_save_on_quit) mp_write_watch_later_conf(mpctx); mpctx->stop_play = PT_QUIT; mpctx->quit_custom_rc = cmd->args[0].v.i; @@ -3764,8 +3764,11 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) } playlist_add(mpctx->playlist, entry); - if (!append || (append == 2 && !mpctx->playlist->current)) + if (!append || (append == 2 && !mpctx->playlist->current)) { + if (opts->position_save_on_quit) // requested in issue #1148 + mp_write_watch_later_conf(mpctx); mp_set_playlist_entry(mpctx, mpctx->playlist->first); + } break; } -- cgit v1.2.3