diff options
Diffstat (limited to 'apps')
-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 | } |