Skip to content

Commit

Permalink
player/loadfile: don't clear watch later for auto playlist parent file
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed Aug 11, 2024
1 parent d06f3d3 commit 9de8142
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions player/loadfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,10 +1679,12 @@ static void play_current_file(struct MPContext *mpctx)
if (!mpctx->demuxer || mpctx->stop_play)
goto terminate_playback;

if (mpctx->demuxer->playlist) {
if (watch_later)
struct playlist *pl = mpctx->demuxer->playlist;
if (pl) {
// pl->playlist_dir indicates that the playlist was auto-created from
// the parent file. In this case, mpctx->filename points to real file.
if (watch_later && !pl->playlist_dir)
mp_delete_watch_later_conf(mpctx, mpctx->filename);
struct playlist *pl = mpctx->demuxer->playlist;
playlist_populate_playlist_path(pl, mpctx->filename);
if (infinite_playlist_loading_loop(mpctx, pl)) {
mpctx->stop_play = PT_STOP;
Expand Down

0 comments on commit 9de8142

Please sign in to comment.