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/trunk@31091 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-11-29 18:38:35 +00:00
parent c40f5202a4
commit 16d736d3c7

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;
}