mirror of
https://github.com/taglib/taglib.git
synced 2025-11-12 20:52:52 -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:
@ -141,12 +141,9 @@ PropertyMap TrueAudio::File::properties() const
|
||||
|
||||
PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
PropertyMap result;
|
||||
if(d->hasID3v1)
|
||||
result = d->tag.access<ID3v1::Tag>(TrueAudioID3v1Index, false)->setProperties(properties);
|
||||
if(d->hasID3v2 || !d->hasID3v1)
|
||||
result =d->tag.access<ID3v2::Tag>(TrueAudioID3v2Index, true)->setProperties(properties);
|
||||
return result;
|
||||
d->tag.access<ID3v1::Tag>(TrueAudioID3v1Index, false)->setProperties(properties);
|
||||
return d->tag.access<ID3v2::Tag>(TrueAudioID3v2Index, true)->setProperties(properties);
|
||||
}
|
||||
|
||||
TrueAudio::Properties *TrueAudio::File::audioProperties() const
|
||||
|
||||
@ -139,8 +139,8 @@ namespace TagLib {
|
||||
|
||||
/*!
|
||||
* Implements the unified property interface -- import function.
|
||||
* As with the export, only one tag is taken into account. If the file
|
||||
* has no tag at all, ID3v2 will be created.
|
||||
* Creates in ID3v2 tag if necessary. If an ID3v1 tag exists, it will
|
||||
* be updated as well, within the limitations of ID3v1.
|
||||
*/
|
||||
PropertyMap setProperties(const PropertyMap &);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user