History

player/loadfile: don't clear watch later for auto playlist parent file

Kacper Michajłow committed 2 years ago

Commit 9978cb81 parent ea01b041 file · +5 −3Browse files

Unified · Split

player/loadfile.c+5−3
@@ -1679,10 +1679,12 @@ static void play_current_file(struct MPContext *mpctx) · 1678 unmodified lines
16791679 if (!mpctx->demuxer || mpctx->stop_play)
16801680 goto terminate_playback;
16811681
1682− if (mpctx->demuxer->playlist) {
1683− if (watch_later)
1682+ struct playlist *pl = mpctx->demuxer->playlist;
1683+ if (pl) {
1684+ // pl->playlist_dir indicates that the playlist was auto-created from
1685+ // the parent file. In this case, mpctx->filename points to real file.
1686+ if (watch_later && !pl->playlist_dir)
16841687 mp_delete_watch_later_conf(mpctx, mpctx->filename);
1685− struct playlist *pl = mpctx->demuxer->playlist;
16861688 playlist_populate_playlist_path(pl, mpctx->filename);
16871689 if (infinite_playlist_loading_loop(mpctx, pl)) {
16881690 mpctx->stop_play = PT_STOP;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t