* Add album art extraction code for more file types.
This commit is contained in:
parent
72309b1c2e
commit
4f489faedc
@ -165,6 +165,14 @@ _get_aactags(char *file, struct song_metadata *psong)
|
||||
{
|
||||
psong->compilation = current_data[16];
|
||||
}
|
||||
else if(!memcmp(current_atom, "covr", 4))
|
||||
{
|
||||
psong->image_size = current_size - 8 - 16;
|
||||
if((psong->image = malloc(psong->image_size)))
|
||||
memcpy(psong->image, current_data+16, psong->image_size);
|
||||
else
|
||||
DPRINTF(E_ERROR, L_SCANNER, "Out of memory [%s]\n", file);
|
||||
}
|
||||
|
||||
free(current_data);
|
||||
current_offset += current_size;
|
||||
|
@ -76,6 +76,13 @@ _get_flctags(char *filename, struct song_metadata *psong)
|
||||
block->data.vorbis_comment.comments[i].length);
|
||||
}
|
||||
break;
|
||||
case FLAC__METADATA_TYPE_PICTURE:
|
||||
psong->image_size = block->data.picture.data_length;
|
||||
if((psong->image = malloc(psong->image_size)))
|
||||
memcpy(psong->image, block->data.picture.data, psong->image_size);
|
||||
else
|
||||
DPRINTF(E_ERROR, L_SCANNER, "Out of memory [%s]\n", filename);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user