mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Support reading deprecated COVERART xiphcomment
This commit is contained in:
parent
70e471f1d1
commit
41a44f4ab2
@ -434,6 +434,23 @@ void Ogg::XiphComment::parse(const ByteVector &data)
|
||||
else
|
||||
debug("Unable to parse METADATA_BLOCK_PICTURE. Discarding content.");
|
||||
}
|
||||
else if (entry.startsWith("COVERART=")) {
|
||||
|
||||
// Decode base64 picture data
|
||||
ByteVector picturedata = ByteVector::fromBase64(entry.mid(9));
|
||||
|
||||
if (picturedata.size() == 0) {
|
||||
debug("Empty coverart data. Discaring content");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Assume it's some type of image file
|
||||
FLAC::Picture * picture = new FLAC::Picture();
|
||||
picture->setData(picturedata);
|
||||
picture->setMimeType("image/");
|
||||
picture->setType(FLAC::Picture::Other);
|
||||
d->pictureList.append(picture);
|
||||
}
|
||||
else {
|
||||
|
||||
// Check for field separator
|
||||
|
Loading…
x
Reference in New Issue
Block a user