summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-04-10 02:25:54 +0200
committerAidan MacDonald <amachronic@protonmail.com>2022-04-17 10:58:42 -0400
commit6703f43f5cc6c6d2f4983aaafd4bcfd582b133cf (patch)
treee4d0fb52fd8f030b9bc5b913bdfe4c24169cdaf4
parent0e8f3669d0d6095723a48c5b888b76931ead2bab (diff)
downloadrockbox-6703f43f5cc6c6d2f4983aaafd4bcfd582b133cf.tar.gz
rockbox-6703f43f5cc6c6d2f4983aaafd4bcfd582b133cf.zip
Playlist Viewer: Always retrieve track Info from disk
Frequency, file size, and the codec are not stored in the database and thus can’t be displayed in the Playlist Viewer's Track Info screen when metadata is only retrieved from the database. Change-Id: I9e1d11c13ad8bf7b90b654ed78e4e7f763c30f8a
-rw-r--r--apps/playlist_viewer.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 6ebac1cb41..a94e07643e 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -484,19 +484,12 @@ static int show_track_info(struct playlist_entry *current_track)
484 struct mp3entry id3; 484 struct mp3entry id3;
485 bool id3_retrieval_successful = false; 485 bool id3_retrieval_successful = false;
486 486
487#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) 487 int fd = open(current_track->name, O_RDONLY);
488 if (tagcache_fill_tags(&id3, current_track->name)) 488 if (fd >= 0)
489 id3_retrieval_successful = true;
490 else
491#endif
492 { 489 {
493 int fd = open(current_track->name, O_RDONLY); 490 if (get_metadata(&id3, fd, current_track->name))
494 if (fd >= 0) 491 id3_retrieval_successful = true;
495 { 492 close(fd);
496 if (get_metadata(&id3, fd, current_track->name))
497 id3_retrieval_successful = true;
498 close(fd);
499 }
500 } 493 }
501 494
502 return id3_retrieval_successful && 495 return id3_retrieval_successful &&