From f56fcd71bbf302595afc19b3a8291cd47f485cfc Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 7 Dec 2014 12:49:07 +0100 Subject: options: add a 'once' idle mode This allows to make mpv wait for file open events at start but close after it is done playing the first playlist. --- options/options.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index 57cf20afa8..223c3ff666 100644 --- a/options/options.c +++ b/options/options.c @@ -541,7 +541,12 @@ const m_option_t mp_opts[] = { OPT_STRING("osd-msg2", osd_msg[1], 0), OPT_STRING("osd-msg3", osd_msg[2], 0), - OPT_FLAG("idle", player_idle_mode, M_OPT_GLOBAL), + OPT_CHOICE("idle", player_idle_mode, M_OPT_OPTIONAL_PARAM, + ({"no", 0}, + {"once", 1}, + {"yes", 2}, + {"", 2})), + OPT_FLAG("input-terminal", consolecontrols, CONF_GLOBAL), OPT_STRING("input-file", input_file, M_OPT_FILE | M_OPT_GLOBAL), -- cgit v1.2.3