From 98e400216d7c6545ffd7d1909c7bfac09b9862f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Dec 2014 23:45:16 +0100 Subject: player: add a --keep-open=always mode The --keep-open behavior was recently changed to act only on the last file due to user requests (see commit 735a9c39). But the old behavior was useful too, so bring it back as an additional mode. Fixes #1332 (or rather, should help with it). --- player/playloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 6d680a0780..42f01ce473 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -807,7 +807,8 @@ static void handle_keep_open(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; if (opts->keep_open && mpctx->stop_play == AT_END_OF_FILE && - !playlist_get_next(mpctx->playlist, 1) && opts->loop_times < 0) + (opts->keep_open == 2 || !playlist_get_next(mpctx->playlist, 1)) && + opts->loop_times < 0) { mpctx->stop_play = KEEP_PLAYING; if (mpctx->d_video) { -- cgit v1.2.3