diff options
author | Mikhail Rudenko <mike.rudenko@gmail.com> | 2020-05-20 00:03:49 +0300 |
---|---|---|
committer | wm4 <1387750+wm4@users.noreply.github.com> | 2020-05-20 15:48:48 +0200 |
commit | a078d07ea25b35d48b27881003c11781dda7af21 (patch) | |
tree | 1da084a6bcc4600f2706a702a007d22d818b0361 /player/command.c | |
parent | 20403abcfaaff38155bd952d4876bf42c1d8e565 (diff) | |
download | mpv-a078d07ea25b35d48b27881003c11781dda7af21.tar.bz2 mpv-a078d07ea25b35d48b27881003c11781dda7af21.tar.xz |
command: save state on stop when user requested save-position-on-quit
Execution of "stop" command in the case when idle mode was not enabled
resulted in player termination scenario not honoring user setting
"save-position-on-quit" from config file. This patch addresses the
issue by checking for "save-position-on-quit" in cmd_stop and saving
state when idle mode is not enabled.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 45b721ef09..c6219676cf 100644 --- a/player/command.c +++ b/player/command.c @@ -5085,6 +5085,13 @@ static void cmd_stop(void *p) if (!(flags & 1)) playlist_clear(mpctx->playlist); + + if (mpctx->opts->player_idle_mode < 2 && + mpctx->opts->position_save_on_quit) + { + mp_write_watch_later_conf(mpctx); + } + if (mpctx->stop_play != PT_QUIT) mpctx->stop_play = PT_STOP; mp_wakeup_core(mpctx); |