mirror of https://github.com/mpv-player/mpv
command: stop restarting playback when writing to playlist-pos
e9e93b4dbe
added a warning about writing
the same value to the playlist-pos property that in the future it would
stop restarting playback. Instead, you should use the
playlist-play-index command for that. Well go ahead and drop the old
deprecated behavior now and do what wm4 wanted this to do: just ignore
if the same value is written again.
This commit is contained in:
parent
29b481da54
commit
4b2276b730
|
@ -79,6 +79,8 @@ Interface changes
|
||||||
- remove deprecated `drop-frame-count` and `vo-drop-frame-count` property aliases
|
- remove deprecated `drop-frame-count` and `vo-drop-frame-count` property aliases
|
||||||
- remove the ability to write to the `display-fps` property (use `override-display-fps`
|
- remove the ability to write to the `display-fps` property (use `override-display-fps`
|
||||||
instead)
|
instead)
|
||||||
|
- writing the current value to playlist-pos will no longer restart playback (use
|
||||||
|
`playlist-play-index` instead)
|
||||||
--- mpv 0.36.0 ---
|
--- mpv 0.36.0 ---
|
||||||
- add `--target-contrast`
|
- add `--target-contrast`
|
||||||
- Target luminance value is now also applied when ICC profile is used.
|
- Target luminance value is now also applied when ICC profile is used.
|
||||||
|
|
|
@ -2772,10 +2772,9 @@ Property list
|
||||||
(Before mpv 0.33.0, instead of returning -1, this property was unavailable
|
(Before mpv 0.33.0, instead of returning -1, this property was unavailable
|
||||||
if no playlist entry was current.)
|
if no playlist entry was current.)
|
||||||
|
|
||||||
Writing the current value back to the property is subject to change.
|
Writing the current value back to the property will have no effect.
|
||||||
Currently, it will restart playback of the playlist entry. But in the
|
Use ``playlist-play-index`` to restart the playback of the current entry if
|
||||||
future, writing the current value will be ignored. Use the
|
desired.
|
||||||
``playlist-play-index`` command to get guaranteed behavior.
|
|
||||||
|
|
||||||
``playlist-pos-1`` (RW)
|
``playlist-pos-1`` (RW)
|
||||||
Same as ``playlist-pos``, but 1-based.
|
Same as ``playlist-pos``, but 1-based.
|
||||||
|
|
|
@ -3037,11 +3037,8 @@ static int mp_property_playlist_pos_x(void *ctx, struct m_property *prop,
|
||||||
}
|
}
|
||||||
case M_PROPERTY_SET: {
|
case M_PROPERTY_SET: {
|
||||||
int pos = *(int *)arg - base;
|
int pos = *(int *)arg - base;
|
||||||
if (pos >= 0 && playlist_entry_to_index(pl, pl->current) == pos) {
|
if (pos >= 0 && playlist_entry_to_index(pl, pl->current) == pos)
|
||||||
MP_WARN(mpctx, "Behavior of %s when writing the same value will "
|
return M_PROPERTY_OK;
|
||||||
"change (currently restarts, it will stop doing this).\n",
|
|
||||||
prop->name);
|
|
||||||
}
|
|
||||||
mp_set_playlist_entry(mpctx, playlist_entry_from_index(pl, pos));
|
mp_set_playlist_entry(mpctx, playlist_entry_from_index(pl, pos));
|
||||||
return M_PROPERTY_OK;
|
return M_PROPERTY_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue