summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-03-15 18:54:20 +0100
committerSolomon Peachy <pizza@shaftnet.org>2021-03-16 12:56:18 +0000
commit46085c897854d145b5313c009fb70af428f0e6bd (patch)
treeb65a9ee4d9dd370b0ca37ae791ffde6a0ea9c744 /apps
parentefe493de3d57831c5b8bf5d4f3f4cc2894adb166 (diff)
Restore playlist state as necessary before checking whether current playlist has been modified
Rockbox would previously not present a warning when you were about to replace a modified playlist after restarting the player, unless you first resumed playback. Change-Id: I9752228f84b105747e41ce6e1c8f95f0f9f14c10
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 6f26b6beda..2c3fa4958e 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -3435,7 +3435,11 @@ int playlist_sort(struct playlist_info* playlist, bool start_current)
bool playlist_modified(const struct playlist_info* playlist)
{
if (!playlist)
+ {
playlist = &current_playlist;
+ if (!playlist->control_created && playlist_resume() == -1)
+ return false;
+ }
if (playlist->shuffle_modified ||
playlist->deleted ||