summaryrefslogtreecommitdiff
path: root/apps/buffering.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-07-05 17:13:10 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-07-09 01:40:02 -0400
commitfdbaf7df597b404be04cecbdc83dbc0551a5b996 (patch)
treef4254d2ed63ce1174d9710a315678aeaf921399b /apps/buffering.c
parent07cf87419189f8730eff53bb74669856a42a2016 (diff)
downloadrockbox-fdbaf7df597b404be04cecbdc83dbc0551a5b996.tar.gz
rockbox-fdbaf7df597b404be04cecbdc83dbc0551a5b996.zip
[Feature] playlist_viewer id3 title display
Not sure this is a great idea from disk and battery standpoint but there is no reason you can't.. using the name buffer to fill title data prevent hitting the disk for each screen scroll add get_metadata_ex to allow flags METADATA_EXCLUDE_ID3_PATH prevent copying the filename to the ID3 struct METADATA_CLOSE_FD_ON_EXIT instead of seeking to the beginning the file is closed before get_metadata returns add logic to allow a invalid fd to signal that get_metadata should open and close the file within its call bugfix per Chris_s don't use the tagcache for the trackinfo Change-Id: Ic7a595b39a8d7a57f975312bc9c8bb4111f22a88
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index bf41544c56..b9f30fc6df 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -652,11 +652,9 @@ static bool buffer_handle(int handle_id, size_t to_buffer)
652 trigger_cpu_boost(); 652 trigger_cpu_boost();
653 653
654 if (h->type == TYPE_ID3) { 654 if (h->type == TYPE_ID3) {
655 if (!get_metadata(ringbuf_ptr(h->data), h->fd, h->path)) { 655 get_metadata_ex(ringbuf_ptr(h->data),
656 /* metadata parsing failed: clear the buffer. */ 656 h->fd, h->path, METADATA_CLOSE_FD_ON_EXIT);
657 wipe_mp3entry(ringbuf_ptr(h->data)); 657 h->fd = -1; /* with above, behavior same as close_fd */
658 }
659 close_fd(&h->fd);
660 h->widx = ringbuf_add(h->data, h->filesize); 658 h->widx = ringbuf_add(h->data, h->filesize);
661 h->end = h->filesize; 659 h->end = h->filesize;
662 send_event(BUFFER_EVENT_FINISHED, &handle_id); 660 send_event(BUFFER_EVENT_FINISHED, &handle_id);