From 5e757b4d6e6531ddd8f1f819525dbbacdb8e994f Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Thu, 11 Aug 2022 22:38:46 +0200 Subject: Playlists: Fix losing cached control data when resuming Shuffle and Unshuffle commands are not flushed to disk when control data is updated. The same applies to Delete and Reset commands, unless HAVE_DIRCACHE is undefined (see update_control() function in playlist.c) playlist_resume() discards cached control data. This resulted in a bug where (e.g.) removed tracks from the current playlist would reappear if you stopped and resumed playing immediately afterwards (instead of restarting in between). Change-Id: I273f61e823a1d99426a18079b81aa07915620f30 --- apps/playlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/playlist.c b/apps/playlist.c index b1d5d5a4be..70a1a0823e 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -2154,6 +2154,7 @@ int playlist_resume(void) } buffer = core_get_data(handle); + playlist_shutdown(); /* flush any cached control commands to disk */ empty_playlist(playlist, true); playlist->control_fd = open(playlist->control_filename, O_RDWR); -- cgit v1.2.3