diff --git a/taglib/ape/apefile.cpp b/taglib/ape/apefile.cpp index 491e24d7..af488646 100644 --- a/taglib/ape/apefile.cpp +++ b/taglib/ape/apefile.cpp @@ -112,14 +112,6 @@ TagLib::Tag *APE::File::tag() const return &d->tag; } -void APE::File::removeUnsupportedProperties(const StringList &properties) -{ - if(d->hasAPE) - d->tag.access(ApeAPEIndex, false)->removeUnsupportedProperties(properties); - if(d->hasID3v1) - d->tag.access(ApeID3v1Index, false)->removeUnsupportedProperties(properties); -} - PropertyMap APE::File::setProperties(const PropertyMap &properties) { if(d->hasID3v1) diff --git a/taglib/ape/apefile.h b/taglib/ape/apefile.h index cdd37062..9ec7dede 100644 --- a/taglib/ape/apefile.h +++ b/taglib/ape/apefile.h @@ -113,12 +113,6 @@ namespace TagLib { */ virtual TagLib::Tag *tag() const; - /*! - * Removes unsupported properties. Forwards to the actual Tag's - * removeUnsupportedProperties() function. - */ - void removeUnsupportedProperties(const StringList &properties); - /*! * Implements the unified property interface -- import function. * Creates an APEv2 tag if necessary. A pontentially existing ID3v1 diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp index ef0325e5..61ac49f2 100644 --- a/taglib/flac/flacfile.cpp +++ b/taglib/flac/flacfile.cpp @@ -138,16 +138,6 @@ TagLib::Tag *FLAC::File::tag() const return &d->tag; } -void FLAC::File::removeUnsupportedProperties(const StringList &unsupported) -{ - if(d->hasXiphComment) - d->tag.access(FlacXiphIndex, false)->removeUnsupportedProperties(unsupported); - if(d->hasID3v2) - d->tag.access(FlacID3v2Index, false)->removeUnsupportedProperties(unsupported); - if(d->hasID3v1) - d->tag.access(FlacID3v1Index, false)->removeUnsupportedProperties(unsupported); -} - PropertyMap FLAC::File::setProperties(const PropertyMap &properties) { return d->tag.access(FlacXiphIndex, true)->setProperties(properties); diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h index 1cd01d49..c854fbe0 100644 --- a/taglib/flac/flacfile.h +++ b/taglib/flac/flacfile.h @@ -110,8 +110,6 @@ namespace TagLib { */ virtual TagLib::Tag *tag() const; - void removeUnsupportedProperties(const StringList &); - /*! * Implements the unified property interface -- import function. * This always creates a Xiph comment, if none exists. The return value diff --git a/taglib/mpc/mpcfile.cpp b/taglib/mpc/mpcfile.cpp index 2638df85..cbd976da 100644 --- a/taglib/mpc/mpcfile.cpp +++ b/taglib/mpc/mpcfile.cpp @@ -116,14 +116,6 @@ TagLib::Tag *MPC::File::tag() const return &d->tag; } -void MPC::File::removeUnsupportedProperties(const StringList &properties) -{ - if(d->hasAPE) - d->tag.access(MPCAPEIndex, false)->removeUnsupportedProperties(properties); - if(d->hasID3v1) - d->tag.access(MPCID3v1Index, false)->removeUnsupportedProperties(properties); -} - PropertyMap MPC::File::setProperties(const PropertyMap &properties) { if(d->hasID3v1) diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h index 1f47996f..0c085650 100644 --- a/taglib/mpc/mpcfile.h +++ b/taglib/mpc/mpcfile.h @@ -113,8 +113,6 @@ namespace TagLib { */ virtual TagLib::Tag *tag() const; - void removeUnsupportedProperties(const StringList &properties); - /*! * Implements the unified property interface -- import function. * Affects only the APEv2 tag which will be created if necessary. diff --git a/taglib/mpeg/mpegfile.cpp b/taglib/mpeg/mpegfile.cpp index 5d1ac1fb..21cf9162 100644 --- a/taglib/mpeg/mpegfile.cpp +++ b/taglib/mpeg/mpegfile.cpp @@ -134,16 +134,6 @@ TagLib::Tag *MPEG::File::tag() const return &d->tag; } -void MPEG::File::removeUnsupportedProperties(const StringList &properties) -{ - if(d->hasID3v2) - d->tag.access(ID3v2Index, false)->removeUnsupportedProperties(properties); - else if(d->hasAPE) - d->tag.access(APEIndex, false)->removeUnsupportedProperties(properties); - else if(d->hasID3v1) - d->tag.access(ID3v1Index, false)->removeUnsupportedProperties(properties); -} - PropertyMap MPEG::File::setProperties(const PropertyMap &properties) { if(d->hasID3v1) diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h index 068432ad..6bf5ad08 100644 --- a/taglib/mpeg/mpegfile.h +++ b/taglib/mpeg/mpegfile.h @@ -132,8 +132,6 @@ namespace TagLib { */ virtual Tag *tag() const; - void removeUnsupportedProperties(const StringList &properties); - /*! * Implements the writing part of the unified tag dictionary interface. * In order to avoid problems with deprecated tag formats, this method diff --git a/taglib/tagunion.cpp b/taglib/tagunion.cpp index 4a5afd32..6815a38f 100644 --- a/taglib/tagunion.cpp +++ b/taglib/tagunion.cpp @@ -113,6 +113,15 @@ PropertyMap TagUnion::properties() const return PropertyMap(); } +void TagUnion::removeUnsupportedProperties(const StringList &unsupported) +{ + for(uint i = 0; i < 3; ++i) { + if(tag(i)) + tag(i)->removeUnsupportedProperties(unsupported); + } +} + + String TagUnion::title() const { stringUnion(title); diff --git a/taglib/tagunion.h b/taglib/tagunion.h index 98b4d338..f8399648 100644 --- a/taglib/tagunion.h +++ b/taglib/tagunion.h @@ -58,6 +58,8 @@ namespace TagLib { virtual PropertyMap properties() const; + virtual void removeUnsupportedProperties(const StringList& properties); + virtual String title() const; virtual String artist() const; virtual String album() const; diff --git a/taglib/trueaudio/trueaudiofile.cpp b/taglib/trueaudio/trueaudiofile.cpp index b584ce67..f1c3c35d 100644 --- a/taglib/trueaudio/trueaudiofile.cpp +++ b/taglib/trueaudio/trueaudiofile.cpp @@ -128,17 +128,6 @@ TagLib::Tag *TrueAudio::File::tag() const return &d->tag; } -PropertyMap TrueAudio::File::properties() const -{ - // once Tag::properties() is virtual, this case distinction could actually be done - // within TagUnion. - if(d->hasID3v2) - return d->tag.access(TrueAudioID3v2Index, false)->properties(); - if(d->hasID3v1) - return d->tag.access(TrueAudioID3v1Index, false)->properties(); - return PropertyMap(); -} - PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties) { if(d->hasID3v1) diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h index d3f51c93..36b9280d 100644 --- a/taglib/trueaudio/trueaudiofile.h +++ b/taglib/trueaudio/trueaudiofile.h @@ -130,13 +130,6 @@ namespace TagLib { */ virtual TagLib::Tag *tag() const; - /*! - * Implements the unified property interface -- export function. - * If the file contains both ID3v1 and v2 tags, only ID3v2 will be - * converted to the PropertyMap. - */ - PropertyMap properties() const; - /*! * Implements the unified property interface -- import function. * Creates in ID3v2 tag if necessary. If an ID3v1 tag exists, it will diff --git a/taglib/wavpack/wavpackfile.cpp b/taglib/wavpack/wavpackfile.cpp index 409ccabf..b68eb009 100644 --- a/taglib/wavpack/wavpackfile.cpp +++ b/taglib/wavpack/wavpackfile.cpp @@ -108,15 +108,6 @@ TagLib::Tag *WavPack::File::tag() const return &d->tag; } -PropertyMap WavPack::File::properties() const -{ - if(d->hasAPE) - return d->tag.access(WavAPEIndex, false)->properties(); - if(d->hasID3v1) - return d->tag.access(WavID3v1Index, false)->properties(); - return PropertyMap(); -} - PropertyMap WavPack::File::setProperties(const PropertyMap &properties) { if(d->hasID3v1) diff --git a/taglib/wavpack/wavpackfile.h b/taglib/wavpack/wavpackfile.h index ca1c752a..f392329a 100644 --- a/taglib/wavpack/wavpackfile.h +++ b/taglib/wavpack/wavpackfile.h @@ -109,13 +109,6 @@ namespace TagLib { */ virtual TagLib::Tag *tag() const; - /*! - * Implements the unified property interface -- export function. - * If the file contains both an APE and an ID3v1 tag, only APE - * will be converted to the PropertyMap. - */ - PropertyMap properties() const; - /*! * Implements the unified property interface -- import function. * Creates an APE tag if it does not exists and calls setProperties() on