summaryrefslogtreecommitdiff
path: root/apps/playlist.h
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/playlist.h
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/playlist.h')
-rw-r--r--apps/playlist.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/playlist.h b/apps/playlist.h
index f7426df9a3..2fb1ce100e 100644
--- a/apps/playlist.h
+++ b/apps/playlist.h
@@ -33,6 +33,8 @@
33#define PLAYLIST_ATTR_QUEUED 0x01 33#define PLAYLIST_ATTR_QUEUED 0x01
34#define PLAYLIST_ATTR_INSERTED 0x02 34#define PLAYLIST_ATTR_INSERTED 0x02
35#define PLAYLIST_ATTR_SKIPPED 0x04 35#define PLAYLIST_ATTR_SKIPPED 0x04
36#define PLAYLIST_ATTR_RETRIEVE_ID3_ATTEMPTED 0x08
37#define PLAYLIST_ATTR_RETRIEVE_ID3_SUCCEEDED 0x10
36 38
37#define PLAYLIST_DISPLAY_COUNT 10 39#define PLAYLIST_DISPLAY_COUNT 10
38 40