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:
Michael Helmling
2012-12-20 17:28:50 +01:00
parent 6e3391a846
commit b14e6a3570
13 changed files with 43 additions and 49 deletions

View File

@ -135,12 +135,9 @@ void MPC::File::removeUnsupportedProperties(const StringList &properties)
PropertyMap MPC::File::setProperties(const PropertyMap &properties)
{
PropertyMap result;
if(d->hasID3v1)
result = d->tag.access<ID3v1::Tag>(MPCID3v1Index, false)->setProperties(properties);
if(d->hasAPE || !d->hasID3v1)
result = d->tag.access<APE::Tag>(MPCAPEIndex, true)->setProperties(properties);
return result;
strip(ID3v1);
return d->tag.access<APE::Tag>(MPCAPEIndex, true)->setProperties(properties);
}
MPC::Properties *MPC::File::audioProperties() const

View File

@ -124,8 +124,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, an APE tag will be created.
* Affects only the APEv2 tag which will be created if necessary.
* If an ID3v1 tag exists, it will be stripped from the file.
*/
PropertyMap setProperties(const PropertyMap &);