diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-08-11 22:38:46 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2022-08-19 00:28:35 -0400 |
commit | 5e757b4d6e6531ddd8f1f819525dbbacdb8e994f (patch) | |
tree | 2d06fb3123cae0fdfb2832e5f752966e506cf8e6 | |
parent | 8f6d0efd71862f107d51bd53ec70e1311a54d9d3 (diff) | |
download | rockbox-5e757b4d6e6531ddd8f1f819525dbbacdb8e994f.tar.gz rockbox-5e757b4d6e6531ddd8f1f819525dbbacdb8e994f.zip |
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
-rw-r--r-- | apps/playlist.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
2154 | } | 2154 | } |
2155 | buffer = core_get_data(handle); | 2155 | buffer = core_get_data(handle); |
2156 | 2156 | ||
2157 | playlist_shutdown(); /* flush any cached control commands to disk */ | ||
2157 | empty_playlist(playlist, true); | 2158 | empty_playlist(playlist, true); |
2158 | 2159 | ||
2159 | playlist->control_fd = open(playlist->control_filename, O_RDWR); | 2160 | playlist->control_fd = open(playlist->control_filename, O_RDWR); |