summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2023-11-01 17:23:56 +0100
committerChristian Soffke <christian.soffke@gmail.com>2024-04-23 05:24:48 +0200
commit446496c221c3b1f29d6b2ea6bb8c0cbb98f7a11c (patch)
tree70f8aba97eba9c6283e9b956f9f36cc3a496de98
parent2905ba2f72661ae97b9f77b384e6f140619a9fa8 (diff)
downloadrockbox-446496c221c3b1f29d6b2ea6bb8c0cbb98f7a11c.tar.gz
rockbox-446496c221c3b1f29d6b2ea6bb8c0cbb98f7a11c.zip
Have Repeat Shuffle turn on Shuffle
When "Repeat Shuffle" is enabled, it may make sense to visibly turn on the Shuffle setting once a playlist ends and starts from the beginning again. This seems to fix a few issues: - After (an unmodified) playlist has been shuffled, bookmarks now behave correctly in terms of restoring the playlist's shuffled state and using the correct resume index. This wasn't the case before. The alternative may be to set the playlist as modified once it is shuffled, to prevent creation of bookmarks from that point on. - Lets you return to the un-shuffled state of the playlist at any point - Icon makes it easy to tell if the "unmodified" playlist has been shuffled already, or not, which wasn't obvious before. Change-Id: I41af04b041fdc7774c9d9267aaf983ec9d402e13
-rw-r--r--apps/playlist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 024f98d2f3..5a3ada8efc 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2874,6 +2874,7 @@ int playlist_next(int steps)
2874 playlist->first_index = 0; 2874 playlist->first_index = 0;
2875 sort_playlist_unlocked(playlist, false, false); 2875 sort_playlist_unlocked(playlist, false, false);
2876 randomise_playlist_unlocked(playlist, current_tick, false, true); 2876 randomise_playlist_unlocked(playlist, current_tick, false, true);
2877 global_settings.playlist_shuffle = true;
2877 2878
2878 playlist->started = true; 2879 playlist->started = true;
2879 playlist->index = 0; 2880 playlist->index = 0;