1
0
Fork 0
forked from len0rd/rockbox

Bring r31091 to v3.10: Make embedded cover art for APEv2 more flexible. This fixes an issue with foobar-tagged files as reported in the forums.

git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_10@31092 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-11-29 18:43:29 +00:00
parent 0f25b560b2
commit 9e76f00927

View file

@ -142,13 +142,14 @@ bool read_ape_tags(int fd, struct mp3entry* id3)
return false;
}
/* Gather the album art format from the pseudo file name. */
/* Gather the album art format from the pseudo file name's ending. */
strcpy(name, name + strlen(name) - 4);
id3->albumart.type = AA_TYPE_UNKNOWN;
if (strcasecmp(name, "cover art (front).jpg") == 0)
if (strcasecmp(name, ".jpg") == 0)
{
id3->albumart.type = AA_TYPE_JPG;
}
else if (strcasecmp(name, "cover art (front).png") == 0)
else if (strcasecmp(name, ".png") == 0)
{
id3->albumart.type = AA_TYPE_PNG;
}