summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-10 14:44:22 +0200
committerwm4 <wm4@nowhere>2014-10-10 14:44:22 +0200
commitf93419f6b223546d36580ad37ca2644c0c4bb971 (patch)
tree13a2d4f8100352ab8a136f210c8943c1aa7947ea /player/command.c
parentd4b2a96d90249dd435679a6f24af2248b1f8dd0b (diff)
downloadmpv-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/command.c')
-rw-r--r--player/command.c7
1 files changed, 5 insertions, 2 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;
}