From 98e400216d7c6545ffd7d1909c7bfac09b9862f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Dec 2014 23:45:16 +0100 Subject: [PATCH] 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). --- DOCS/man/options.rst | 29 ++++++++++++++++++++--------- options/options.c | 5 ++++- player/playloop.c | 3 ++- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 81f1501048..412d4d355d 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1485,26 +1485,37 @@ Window OS X only. Black out other displays when going fullscreen. -``--keep-open`` +``--keep-open=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) {