mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
options: --loop=N means playback N times, not N+1 times
The argument or this change is that --loop should set how often the file is played, not the number of additional repeats. Based on pull request 277, with additions to the manpage and removal of "--loop=0". Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
d1c473bc25
commit
7ce464bef9
@ -1267,10 +1267,11 @@
|
||||
playlist formats to the special demuxer is work in progress, and eventually
|
||||
the old code should disappear.
|
||||
|
||||
``--loop=<number|inf|no>``
|
||||
Loops playback ``<number>`` times. ``inf`` means forever and ``no`` disables
|
||||
looping. If several files are specified on command line, the entire playlist
|
||||
is looped.
|
||||
``--loop=<N|inf|no>``
|
||||
Loops playback ``N`` times. A value of ``1`` plays it one time (default),
|
||||
``2`` two times, etc. ``inf`` means forever. ``no`` is the same as ``1`` and
|
||||
disables looping. If several files are specified on command line, the
|
||||
entire playlist is looped.
|
||||
|
||||
``--lua=<filename>``
|
||||
Load a Lua script. You can load multiple scripts by separating them with
|
||||
|
@ -4736,9 +4736,9 @@ struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
|
||||
if (mpctx->opts->shuffle)
|
||||
playlist_shuffle(mpctx->playlist);
|
||||
next = mpctx->playlist->first;
|
||||
if (next && mpctx->opts->loop_times > 0) {
|
||||
if (next && mpctx->opts->loop_times > 1) {
|
||||
mpctx->opts->loop_times--;
|
||||
if (mpctx->opts->loop_times == 0)
|
||||
if (mpctx->opts->loop_times == 1)
|
||||
mpctx->opts->loop_times = -1;
|
||||
}
|
||||
} else {
|
||||
|
@ -681,8 +681,8 @@ const m_option_t mp_opts[] = {
|
||||
{"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
|
||||
#endif
|
||||
|
||||
OPT_CHOICE_OR_INT("loop", loop_times, M_OPT_GLOBAL, 1, 10000,
|
||||
({"no", -1}, {"0", -1},
|
||||
OPT_CHOICE_OR_INT("loop", loop_times, M_OPT_GLOBAL, 2, 10000,
|
||||
({"no", -1}, {"1", -1},
|
||||
{"inf", 0})),
|
||||
|
||||
OPT_FLAG("resume-playback", position_resume, 0),
|
||||
|
Loading…
Reference in New Issue
Block a user