summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-12 23:45:16 +0100
committerwm4 <wm4@nowhere>2014-12-12 23:45:16 +0100
commit98e400216d7c6545ffd7d1909c7bfac09b9862f3 (patch)
tree7433f8b5448fc5a7398edc76e6ba23e372e781bc /options
parent2768ded1b981e43a3bd15d9fe6bb0cf3a303254d (diff)
downloadmpv-98e400216d7c6545ffd7d1909c7bfac09b9862f3.tar.bz2
mpv-98e400216d7c6545ffd7d1909c7bfac09b9862f3.tar.xz
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).
Diffstat (limited to 'options')
-rw-r--r--options/options.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index 7c52a60a2a..fb48c39e74 100644
--- a/options/options.c
+++ b/options/options.c
@@ -186,7 +186,10 @@ const m_option_t mp_opts[] = {
OPT_TIME("ab-loop-b", ab_loop[1], 0, .min = MP_NOPTS_VALUE),
OPT_FLAG("pause", pause, M_OPT_FIXED),
- OPT_FLAG("keep-open", keep_open, 0),
+ OPT_CHOICE("keep-open", keep_open, M_OPT_OPTIONAL_PARAM,
+ ({"no", 0},
+ {"yes", 1}, {"", 1},
+ {"always", 2})),
OPT_CHOICE("index", index_mode, 0, ({"default", 1}, {"recreate", 0})),