mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 09:32:40 +00:00
player: properly resume playlists loaded at runtime
If a playlist is loaded from the internal playlist (like "mpv playlist.m3u"), then attempt to resume from it. CC: @mpv-player/stable
This commit is contained in:
parent
2da246b9f7
commit
6c1e528518
@ -930,10 +930,13 @@ static void print_resolve_contents(struct mp_log *log,
|
||||
static void transfer_playlist(struct MPContext *mpctx, struct playlist *pl)
|
||||
{
|
||||
if (pl->first) {
|
||||
struct playlist_entry *new = mp_check_playlist_resume(mpctx, pl);
|
||||
playlist_transfer_entries(mpctx->playlist, pl);
|
||||
// current entry is replaced
|
||||
if (mpctx->playlist->current)
|
||||
playlist_remove(mpctx->playlist, mpctx->playlist->current);
|
||||
if (new)
|
||||
mpctx->playlist->current = new;
|
||||
} else {
|
||||
MP_WARN(mpctx, "Empty playlist!\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user