Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Playlist Catalogue: fix: "Save Current Playlist" may fail silently

- After rebooting, unless the current playlist
had been manually resumed already, the "Save
Current Playlist" option in the root menu's/
playlist catalogue's context menu failed to work.

- Eliminate error message attempting to view current
playlist when no control file present.

Change-Id: I58f1d3dc6f256fcee106ff5a17f69fa46d67b2e4

+17 -1
+15
apps/menus/playlist_menu.c
··· 48 48 49 49 char temp[MAX_PATH+1], *p; 50 50 int len; 51 + bool audio_stopped = !(audio_status() & AUDIO_STATUS_PLAY); 52 + 53 + /* After a reboot, we may need to resume the playlist 54 + first, or it will not contain any indices when 55 + user selects "Save Current Playlist" from playlist 56 + catalogue's context menu in root menu */ 57 + if (!playlist && audio_stopped && !playlist_get_current()->started) 58 + { 59 + if (!file_exists(PLAYLIST_CONTROL_FILE) || playlist_resume() == -1) 60 + { 61 + splash(HZ, ID2P(LANG_CATALOG_NO_PLAYLISTS)); 62 + return 0; 63 + } 64 + } 65 + 51 66 52 67 catalog_get_directory(directoryonly, sizeof(directoryonly)); 53 68 playlist_get_name(playlist, temp, sizeof(temp)-1);
+1
apps/playlist.c
··· 2048 2048 { 2049 2049 playlist->max_playlist_size = current_playlist.max_playlist_size; 2050 2050 playlist->indices = current_playlist.indices; 2051 + current_playlist.started = false; 2051 2052 } 2052 2053 2053 2054 new_playlist_unlocked(playlist, dir, file);
+1 -1
apps/playlist_viewer.c
··· 387 387 if (!filename && !is_playing) 388 388 { 389 389 /* Try to restore the list from control file */ 390 - if (playlist_resume() == -1) 390 + if (!file_exists(PLAYLIST_CONTROL_FILE) || playlist_resume() == -1) 391 391 { 392 392 /* Nothing to view, exit */ 393 393 splash(HZ, ID2P(LANG_CATALOG_NO_PLAYLISTS));