From 6c1e5285181a0799c689ab71fc703fa67917e303 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Sep 2014 22:16:20 +0200 Subject: 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 --- player/loadfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/player/loadfile.c b/player/loadfile.c index 46a7067a9f..00a10aa34f 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -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"); } -- cgit v1.2.3