mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
[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
This commit is contained in:
parent
07cf874191
commit
fdbaf7df59
9 changed files with 145 additions and 89 deletions
|
|
@ -1787,7 +1787,6 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
|
|||
{
|
||||
unsigned char data[70] = {0x04, 0x00, 0xFF};
|
||||
struct mp3entry id3;
|
||||
int fd;
|
||||
size_t len;
|
||||
long tracknum = get_u32(&buf[3]);
|
||||
|
||||
|
|
@ -1802,10 +1801,8 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
|
|||
{
|
||||
struct playlist_track_info info;
|
||||
playlist_get_track_info(NULL, tracknum, &info);
|
||||
fd = open(info.filename, O_RDONLY);
|
||||
memset(&id3, 0, sizeof(struct mp3entry));
|
||||
get_metadata(&id3, fd, info.filename);
|
||||
close(fd);
|
||||
/* memset(&id3, 0, sizeof(struct mp3entry)); --get_metadata does this for us */
|
||||
get_metadata(&id3, -1, info.filename);
|
||||
}
|
||||
/* Return the requested track data */
|
||||
switch(cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue