diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-03-15 18:54:20 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-16 12:56:18 +0000 |
commit | 46085c897854d145b5313c009fb70af428f0e6bd (patch) | |
tree | b65a9ee4d9dd370b0ca37ae791ffde6a0ea9c744 | |
parent | efe493de3d57831c5b8bf5d4f3f4cc2894adb166 (diff) | |
download | rockbox-46085c897854d145b5313c009fb70af428f0e6bd.tar.gz rockbox-46085c897854d145b5313c009fb70af428f0e6bd.zip |
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
-rw-r--r-- | apps/playlist.c | 4 |
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) | |||
3435 | bool playlist_modified(const struct playlist_info* playlist) | 3435 | bool playlist_modified(const struct playlist_info* playlist) |
3436 | { | 3436 | { |
3437 | if (!playlist) | 3437 | if (!playlist) |
3438 | { | ||
3438 | playlist = ¤t_playlist; | 3439 | playlist = ¤t_playlist; |
3440 | if (!playlist->control_created && playlist_resume() == -1) | ||
3441 | return false; | ||
3442 | } | ||
3439 | 3443 | ||
3440 | if (playlist->shuffle_modified || | 3444 | if (playlist->shuffle_modified || |
3441 | playlist->deleted || | 3445 | playlist->deleted || |