From 16d736d3c76204d60c86531f8f434b83909e0a4a Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Tue, 29 Nov 2011 18:38:35 +0000 Subject: 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 --- apps/metadata/ape.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/metadata/ape.c b/apps/metadata/ape.c index eb534a498f..8fe296c2d9 100644 --- a/apps/metadata/ape.c +++ b/apps/metadata/ape.c @@ -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; } -- cgit v1.2.3