mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Added removePicture() to FLAC::File
This commit is contained in:
parent
ce53d13af1
commit
bec3875b94
@ -493,6 +493,17 @@ void FLAC::File::addPicture(Picture *picture)
|
||||
d->blocks.append(picture);
|
||||
}
|
||||
|
||||
void FLAC::File::removePicture(Picture *picture, bool del)
|
||||
{
|
||||
MetadataBlock *block = picture;
|
||||
List<MetadataBlock *>::Iterator it = d->blocks.find(block);
|
||||
if(it != d->blocks.end())
|
||||
d->blocks.erase(it);
|
||||
|
||||
if(del)
|
||||
delete picture;
|
||||
}
|
||||
|
||||
void FLAC::File::removePictures()
|
||||
{
|
||||
List<MetadataBlock *> newBlocks;
|
||||
|
@ -201,6 +201,12 @@ namespace TagLib {
|
||||
* Returns a list of pictures attached to the FLAC file.
|
||||
*/
|
||||
List<Picture *> pictureList();
|
||||
|
||||
/*!
|
||||
* Removes an attached picture. If \a del is true the picture's memory
|
||||
* will be freed; if it is false, it must be deleted by the user.
|
||||
*/
|
||||
void removePicture(Picture *picture, bool del = true);
|
||||
|
||||
/*!
|
||||
* Remove all attached images.
|
||||
|
Loading…
x
Reference in New Issue
Block a user