mirror of
https://github.com/taglib/taglib.git
synced 2025-11-17 07:02:53 -05:00
Update for pull request #89: Change how setProperties() updates tags.
For file types supporting more than one tag format, setProperties() now always creates the most modern one. Deprecated tags are stripped.
This commit is contained in:
@ -131,12 +131,9 @@ void APE::File::removeUnsupportedProperties(const StringList &properties)
|
||||
|
||||
PropertyMap APE::File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
PropertyMap result;
|
||||
if(d->hasID3v1)
|
||||
result = d->tag.access<ID3v1::Tag>(ApeID3v1Index, false)->setProperties(properties);
|
||||
if(d->hasAPE || !d->hasID3v1)
|
||||
result = d->tag.access<APE::Tag>(ApeAPEIndex, true)->setProperties(properties);
|
||||
return result;
|
||||
strip(ID3v1);
|
||||
return d->tag.access<APE::Tag>(ApeAPEIndex, true)->setProperties(properties);
|
||||
}
|
||||
|
||||
APE::Properties *APE::File::audioProperties() const
|
||||
|
||||
@ -128,8 +128,9 @@ namespace TagLib {
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- import function.
|
||||
* As for the export, only one tag is taken into account. If the file
|
||||
* has no tag at all, APE will be created.
|
||||
* Creates an APEv2 tag if necessary. A pontentially existing ID3v1
|
||||
* tag is considered deprecated and will be removed, invalidating all
|
||||
* pointers to that tag.
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user