diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-11-29 18:38:35 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-11-29 18:38:35 +0000 |
commit | 16d736d3c76204d60c86531f8f434b83909e0a4a (patch) | |
tree | 46def4f8d8cf9365ff3b3a39f19426eb0a8eebbf | |
parent | c40f5202a478de14730bff3722733e7483cd4703 (diff) | |
download | rockbox-16d736d3c76204d60c86531f8f434b83909e0a4a.tar.gz rockbox-16d736d3c76204d60c86531f8f434b83909e0a4a.zip |
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
-rw-r--r-- | apps/metadata/ape.c | 7 |
1 files 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) | |||
142 | return false; | 142 | return false; |
143 | } | 143 | } |
144 | 144 | ||
145 | /* Gather the album art format from the pseudo file name. */ | 145 | /* Gather the album art format from the pseudo file name's ending. */ |
146 | strcpy(name, name + strlen(name) - 4); | ||
146 | id3->albumart.type = AA_TYPE_UNKNOWN; | 147 | id3->albumart.type = AA_TYPE_UNKNOWN; |
147 | if (strcasecmp(name, "cover art (front).jpg") == 0) | 148 | if (strcasecmp(name, ".jpg") == 0) |
148 | { | 149 | { |
149 | id3->albumart.type = AA_TYPE_JPG; | 150 | id3->albumart.type = AA_TYPE_JPG; |
150 | } | 151 | } |
151 | else if (strcasecmp(name, "cover art (front).png") == 0) | 152 | else if (strcasecmp(name, ".png") == 0) |
152 | { | 153 | { |
153 | id3->albumart.type = AA_TYPE_PNG; | 154 | id3->albumart.type = AA_TYPE_PNG; |
154 | } | 155 | } |