playback: add Playlist Single Mode option

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Mon, 27 Jul 2026 22:22:47 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 31dfd5da2e6d3522c6db027c99485314c87cc20e
Author: Roman Artiukhin <[email protected]>
Date:   Sun Jul 26 08:52:15 2026 +0300

    playback: add Playlist Single Mode option
    
    Change-Id: I27c782ad246135fa6c98b52ed1491e86a7dfd456

diff --git a/apps/playback.c b/apps/playback.c
index ccb9aa1c8c..270de50bf6 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2685,6 +2685,9 @@ static bool single_mode_do_pause(int id3_hid)
         if (global_settings.single_mode == SINGLE_MODE_TRACK)
             return true;
 
+        if (global_settings.single_mode == SINGLE_MODE_PLAYLIST && skip_pending == TRACK_SKIP_AUTO_NEW_PLAYLIST)
+            return true;
+
         char *previous_tag = single_mode_get_id3_tag(id3_get(PLAYING_ID3));
         char *new_tag = single_mode_get_id3_tag(bufgetid3(id3_hid));
         return previous_tag == NULL ||
diff --git a/apps/settings.h b/apps/settings.h
index a2ce824a5e..0fc07a2413 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -124,7 +124,8 @@ enum {
     SINGLE_MODE_ARTIST,
     SINGLE_MODE_COMPOSER,
     SINGLE_MODE_GROUPING,
-    SINGLE_MODE_GENRE
+    SINGLE_MODE_GENRE,
+    SINGLE_MODE_PLAYLIST,
 };
 
 enum
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 0887e0527a..42d4dc4245 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1471,8 +1471,8 @@ const struct settings_list settings[] = {
     OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
     CHOICE_SETTING(0, single_mode, LANG_SINGLE_MODE, 0,
                   "single mode",
-                  "off,track,album,album artist,artist,composer,work,genre",
-                  NULL, 8,
+                  "off,track,album,album artist,artist,composer,work,genre,playlist",
+                  NULL, 9,
                   ID2P(LANG_OFF),
                   ID2P(LANG_TRACK),
                   ID2P(LANG_ID3_ALBUM),
@@ -1480,7 +1480,9 @@ const struct settings_list settings[] = {
                   ID2P(LANG_ID3_ARTIST),
                   ID2P(LANG_ID3_COMPOSER),
                   ID2P(LANG_ID3_GROUPING),
-                  ID2P(LANG_ID3_GENRE)),
+                  ID2P(LANG_ID3_GENRE),
+                  ID2P(LANG_PLAYLIST)
+                  ),
     OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL),
     OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL),
     INT_SETTING(F_TIME_SETTING, ff_rewind_min_step, LANG_FFRW_STEP, 1,
diff --git a/manual/appendix/config_file_options.tex b/manual/appendix/config_file_options.tex
index 2b580f3206..d7adb64be9 100644
--- a/manual/appendix/config_file_options.tex
+++ b/manual/appendix/config_file_options.tex
@@ -36,7 +36,7 @@
     repeat          & off, all, one, shuffle, ab
                                         & N/A\\
     play selected   & on, off           & N/A\\
-    single mode     & off, track, album, album artist, artist, composer, work, genre
+    single mode     & off, track, album, album artist, artist, composer, work, genre, playlist
                     & N/A\\
     party mode      & on, off           & N/A\\
     scan min step   & 1, 2, 3, 4, 5, 6, 8, 10, 15, 20, 25, 30, 45, 60
diff --git a/manual/configure_rockbox/playback_options.tex b/manual/configure_rockbox/playback_options.tex
index 3287c61739..66a90c6f6b 100644
--- a/manual/configure_rockbox/playback_options.tex
+++ b/manual/configure_rockbox/playback_options.tex
@@ -88,6 +88,7 @@ you to configure settings related to audio playback.
   \setting{Composer}, \setting{Work}, or \setting{Genre},
   your music will pause at the next track change where this tag also
   changes.
+  If it is set to Playlist, your music will pause on the next automatic playlist change.
 
 \section{Party Mode}
   Enables unstoppable music playback. When new songs are
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs