summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
authorPaul Sauro <olsroparadise@proton.me>2024-09-07 13:55:45 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2024-09-09 18:21:38 -0400
commitf7db73097a30a9cd5ec6415fcc197749ee1bc559 (patch)
tree116924fcc95a4400ead473ce69652192a405eff7 /apps/settings_list.c
parenta7cfee640dcaa00e3717bd2ef4bd54489f491960 (diff)
downloadrockbox-f7db73097a30a9cd5ec6415fcc197749ee1bc559.tar.gz
rockbox-f7db73097a30a9cd5ec6415fcc197749ee1bc559.zip
Playlist viewer: Add new options to allow formatting using tags
Offer new options to show elegantly your entries in any playlist/dynamic playlist viewer. This is especially important if you dual boot an iPod with Stock OS and want to sync with iTunes; with this very popular setup, file names are obfuscated which results in any Rockbox playlist viewer difficult to enjoy, and it was a long standing issue reported by several Rockbox users over the years. The only way to show the title was to open a contextual menu on each song to get infos about the selected song, which is a very long and anti-ergonomic process to understand what is on your current playlist/randomized playlist. The idea of this patch is to provide new alternatives that the user can select. I personally selected the Title & Album view which provides excellent readability. This patch was built with performance in mind using lazy loading to load one by one the tags then cache a string and use the little cache as much as possible to make scrolling in the same area as smooth as possible. Performance remains very acceptable even on an iPod 4G with its original hard drive. Using a real compact flash with my iPod Mini 2G reduces the latency even more. Those new options are disabled by default because they impact noticeably the scrolling performance and are less relevant if your files are decently properly named. Unfortunately, the search feature in a playlist will need to continue to use the raw filename because reading the tags for a whole playlist is a performance disaster. This works decently while viewing just because I made a code that load those one by one as much as possible. I focused also on testing that the opening of the playlist viewer UI remained fast, and loading one by one with lazy loading allows to get very little overhead in this regard. Change-Id: I00d9c802e29f8372447813b035bbae207a016467
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r--apps/settings_list.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 3b29703fe9..a9f627bfa6 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1421,9 +1421,11 @@ const struct settings_list settings[] = {
1421 OFFON_SETTING(0,playlist_viewer_indices,LANG_SHOW_INDICES,true, 1421 OFFON_SETTING(0,playlist_viewer_indices,LANG_SHOW_INDICES,true,
1422 "playlist viewer indices",NULL), 1422 "playlist viewer indices",NULL),
1423 CHOICE_SETTING(0, playlist_viewer_track_display, LANG_TRACK_DISPLAY, 0, 1423 CHOICE_SETTING(0, playlist_viewer_track_display, LANG_TRACK_DISPLAY, 0,
1424 "playlist viewer track display","track name,full path", 1424 "playlist viewer track display",
1425 NULL, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY), 1425 "track name,full path,title and album from tags,title from tags",
1426 ID2P(LANG_DISPLAY_FULL_PATH)), 1426 NULL, 4, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY),
1427 ID2P(LANG_DISPLAY_FULL_PATH),ID2P(LANG_DISPLAY_TITLEALBUM_FROMTAGS),
1428 ID2P(LANG_DISPLAY_TITLE_FROMTAGS)),
1427 CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_ON, 1429 CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_ON,
1428 "recursive directory insert", off_on_ask, NULL , 3 , 1430 "recursive directory insert", off_on_ask, NULL , 3 ,
1429 ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)), 1431 ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)),