diff options
author | wm4 <wm4@nowhere> | 2014-10-10 14:44:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-10 14:44:22 +0200 |
commit | f93419f6b223546d36580ad37ca2644c0c4bb971 (patch) | |
tree | 13a2d4f8100352ab8a136f210c8943c1aa7947ea /player | |
parent | d4b2a96d90249dd435679a6f24af2248b1f8dd0b (diff) | |
download | mpv-f93419f6b223546d36580ad37ca2644c0c4bb971.tar.bz2 mpv-f93419f6b223546d36580ad37ca2644c0c4bb971.tar.xz |
player: --save-position-on-quit should always work (2)
This reimplements the feature reverted in the previous commit in a
different way.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 7 | ||||
-rw-r--r-- | player/loadfile.c | 3 |
2 files changed, 5 insertions, 5 deletions
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; } diff --git a/player/loadfile.c b/player/loadfile.c index ac1d765619..a30c491227 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1194,9 +1194,6 @@ terminate_playback: if (mpctx->stop_play != AT_END_OF_FILE) clear_audio_output_buffers(mpctx); - if (opts->position_save_on_quit && mpctx->stop_play == PT_QUIT) - mp_write_watch_later_conf(mpctx); - if (mpctx->step_frames) opts->pause = 1; |