···142142 return false;
143143 }
144144145145- /* Gather the album art format from the pseudo file name. */
145145+ /* Gather the album art format from the pseudo file name's ending. */
146146+ strcpy(name, name + strlen(name) - 4);
146147 id3->albumart.type = AA_TYPE_UNKNOWN;
147147- if (strcasecmp(name, "cover art (front).jpg") == 0)
148148+ if (strcasecmp(name, ".jpg") == 0)
148149 {
149150 id3->albumart.type = AA_TYPE_JPG;
150151 }
151151- else if (strcasecmp(name, "cover art (front).png") == 0)
152152+ else if (strcasecmp(name, ".png") == 0)
152153 {
153154 id3->albumart.type = AA_TYPE_PNG;
154155 }