playlist viewer: retrieve track name id3 from db

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Tue, 12 May 2026 09:38:30 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 51abd937d50c05935e2949433da9088c0bc3c1cb
Author: Christian Soffke <[email protected]>
Date:   Mon May 11 14:49:25 2026 +0200

    playlist viewer: retrieve track name id3 from db
    
    Metadata for formatting the trackname can
    be read from the database instead of from
    disk. I think this was changed by mistake,
    when a single function was added for both
    Show Track Info and track name formatting.
    
    Change-Id: I903d36bb513898242505f01562340924bf642a12

diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 176d15a989..8e28606652 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -52,6 +52,10 @@
 #include "yesno.h"
 #include "playback.h"
 
+#if defined (HAVE_TAGCACHE) && defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
+#include "tagcache.h"
+#endif
+
 /* Maximum number of tracks we can have loaded at one time                   */
 #define MAX_PLAYLIST_ENTRIES 200
 
@@ -285,9 +289,15 @@ static bool retrieve_id3_tags(const int index, const char* name, struct mp3entry
         copy_mp3entry(id3, audio_current_track()); /* retrieve id3 from RAM */
         id3_retrieval_successful = true;
     }
-    else
+#if defined (HAVE_TAGCACHE) && defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
+    else if (flags & METADATA_EXCLUDE_ID3_PATH)
+        /* retrieve id3 from database */
+        id3_retrieval_successful = tagcache_fill_tags(id3, name);
+#endif
+
+    if (!id3_retrieval_successful)
     {
-    /* Read from disk, the database, doesn't store frequency, file size or codec (g4470) ChrisS*/
+        /* Read from disk: retrieves frequency, file size, and codec */
         id3_retrieval_successful = get_metadata_ex(id3, -1, name, flags);
     }
     return id3_retrieval_successful;
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs