mirror of
https://github.com/taglib/taglib.git
synced 2025-11-17 07:02:53 -05:00
Consistently handle invalid and deprecated tags in setProperties()
This commit reverts the use of strip() in setProperties() because the latter function should not change the file before save() is called. Instead, the following policy is now consistently applied for file formats with multiple tag types: - the recommended tag type is created, if it does not exist - deprecated tags are updated, if they exist, but not created - illegal tag types are ignored by setProperties(), but used in properties() if no others exist. The only tag types considered "illegal" so far are APEv2 in MPEG and ID3 in FLAC.
This commit is contained in:
@ -132,7 +132,7 @@ void APE::File::removeUnsupportedProperties(const StringList &properties)
|
||||
PropertyMap APE::File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
if(d->hasID3v1)
|
||||
strip(ID3v1);
|
||||
d->tag.access<ID3v1::Tag>(ApeID3v1Index, false)->setProperties(properties);
|
||||
return d->tag.access<APE::Tag>(ApeAPEIndex, true)->setProperties(properties);
|
||||
}
|
||||
|
||||
|
||||
@ -129,8 +129,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* Implements the unified property interface -- import function.
|
||||
* Creates an APEv2 tag if necessary. A pontentially existing ID3v1
|
||||
* tag is considered deprecated and will be removed, invalidating all
|
||||
* pointers to that tag.
|
||||
* tag will be updated as well.
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user