summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-18 13:38:45 +0200
committerwm4 <wm4@nowhere>2016-09-18 16:08:21 +0200
commit9e972ed7d28c33bf612452682f229fa14ef017ea (patch)
tree747742a503bf7d866a3f99efb9821b34c552c627
parent62d4a3891a152253a91f2054dd7b24c1aa5d285f (diff)
downloadmpv-9e972ed7d28c33bf612452682f229fa14ef017ea.tar.bz2
mpv-9e972ed7d28c33bf612452682f229fa14ef017ea.tar.xz
options: rename/deprecate --playlist-pos
Conflicts with the "playlist-pos" property. They're really a bit too different, and since the --playlist-pos option is relatively new and obscure, just rename it to get this out of the way.
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/input.rst8
-rw-r--r--DOCS/man/options.rst8
-rw-r--r--options/options.c4
-rw-r--r--player/command.c3
5 files changed, 11 insertions, 13 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index a5c141d953..339b7ffd9e 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -63,6 +63,7 @@ Interface changes
- deprecate the ao and vo auto-profiles (they never made any sense)
- deprecate "--vo=direct3d_shaders" - use "--vo=direct3d" instead.
Change "--vo=direct3d" to always use shaders by default.
+ - deprecate --playlist-pos option, renamed to --playlist-start
- incompatible change to cdda:// protocol options: the part after cdda://
now always sets the device, not the span or speed to be played. No
separating extra "/" is needed. The hidden --cdda-device options is also
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index c7c7c0d887..e626b1ba81 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -2122,12 +2122,6 @@ caveats with some properties (due to historical reasons):
option is for loading playlist during command line parsing. For client API
uses, you should use the ``loadlist`` command instead.
-``playlist-pos``
- The property refuses setting out of range values, restarts playback
- immediately when writing to it, and does not know the ``no`` value (which
- the option uses to indicate the default state, that is resuming a file
- on the playlist and jumping to that instead of entry 0).
-
``audio-file``, ``sub-file``, ``external-file``
These options/properties are actually lists of filenames. To make the
command-line interface easier, each ``--audio-file=...`` option appends
@@ -2141,7 +2135,7 @@ caveats with some properties (due to historical reasons):
Strictly speaking, option access via API (e.g. ``mpv_set_option_string()``)
has the same problem, and it's only a difference between CLI/API.
-``demuxer``, ``idle``, ``length``, ``audio-samplerate``, ``audio-channels``, ``audio-format``, ``fps``, ``cache``
+``demuxer``, ``idle``, ``length``, ``audio-samplerate``, ``audio-channels``, ``audio-format``, ``fps``, ``cache``, ``playlist-pos``
These behave completely different as property, but are deprecated (newer
aliases which don't conflict have been added). After the deprecation period
they will be changed to the proper option behavior.
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index cefd12eae5..349d948834 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -157,17 +157,19 @@ Playback Control
See also: ``--start``.
-``--playlist-pos=<no|index>``
+``--playlist-start=<auto|index>``
Set which file on the internal playlist to start playback with. The index
- is an integer, with 0 meaning the first file. The value ``no`` means that
+ is an integer, with 0 meaning the first file. The value ``auto`` means that
the selection of the entry to play is left to the playback resume mechanism
(default). If an entry with the given index doesn't exist, the behavior is
unspecified and might change in future mpv versions. The same applies if
the playlist contains further playlists (don't expect any reasonable
behavior). Passing a playlist file to mpv should work with this option,
- though. E.g. ``mpv playlist.m3u --playlist-pos=123`` will work as expected,
+ though. E.g. ``mpv playlist.m3u --playlist-start=123`` will work as expected,
as long as ``playlist.m3u`` does not link to further playlists.
+ The value ``no`` is a deprecated alias for ``auto``.
+
``--playlist=<filename>``
Play files according to a playlist file (Supports some common formats. If
no format is detected, it will be treated as list of files, separated by
diff --git a/options/options.c b/options/options.c
index 29fd14e7f5..2ae0f6ad3b 100644
--- a/options/options.c
+++ b/options/options.c
@@ -317,7 +317,8 @@ const m_option_t mp_opts[] = {
OPT_TIME("ab-loop-a", ab_loop[0], 0, .min = MP_NOPTS_VALUE),
OPT_TIME("ab-loop-b", ab_loop[1], 0, .min = MP_NOPTS_VALUE),
- OPT_CHOICE_OR_INT("playlist-pos", playlist_pos, 0, 0, INT_MAX, ({"no", -1})),
+ OPT_CHOICE_OR_INT("playlist-start", playlist_pos, 0, 0, INT_MAX,
+ ({"auto", -1}, {"no", -1})),
OPT_FLAG("pause", pause, M_OPT_FIXED),
OPT_CHOICE("keep-open", keep_open, 0,
@@ -754,6 +755,7 @@ const m_option_t mp_opts[] = {
OPT_REPLACED("input-unix-socket", "input-ipc-server"),
OPT_REPLACED("softvol-max", "volume-max"),
OPT_REMOVED("bluray-angle", "this didn't do anything for a few releases"),
+ OPT_REPLACED("playlist-pos", "playlist-start"),
{0}
};
diff --git a/player/command.c b/player/command.c
index 013e303ffe..877e0e7e5a 100644
--- a/player/command.c
+++ b/player/command.c
@@ -280,10 +280,9 @@ int mp_on_set_option(void *ctx, struct m_config_option *co, void *data, int flag
// OK, is handled separately: playlist
// OK, does not conflict on low level: audio-file, sub-file, external-file
static const char *const no_property[] = {
- "playlist-pos", // checks playlist bounds, "no" choice missing
"volume", // restricts to --volume-max
"demuxer", "idle", "length", "audio-samplerate", "audio-channels",
- "audio-format", "fps", "cache", // different semantics
+ "audio-format", "fps", "cache", "playlist-pos", // different semantics
NULL
};