mirror of
https://github.com/taglib/taglib.git
synced 2026-08-27 12:47:01 -04:00
some cosmetic changes
This commit is contained in:
@@ -161,11 +161,11 @@ PropertyMap TextIdentificationFrame::asProperties() const
|
||||
*it = ID3v1::genre(test);
|
||||
}
|
||||
} else if(tagName == "DATE") {
|
||||
for (StringList::Iterator it = values.begin(); it != values.end(); ++it) {
|
||||
for(StringList::Iterator it = values.begin(); it != values.end(); ++it) {
|
||||
// ID3v2 specifies ISO8601 timestamps which contain a 'T' as separator between date and time.
|
||||
// Since this is unusual in other formats, the T is removed.
|
||||
int tpos = it->find("T");
|
||||
if (tpos != -1)
|
||||
if(tpos != -1)
|
||||
(*it)[tpos] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,12 +135,7 @@ namespace TagLib {
|
||||
void setTextEncoding(String::Type encoding);
|
||||
|
||||
|
||||
/*!
|
||||
* Parses this frame as PropertyMap. The returned map will contain a single key
|
||||
* "LYRICS" with the text() as single value.
|
||||
*/
|
||||
/*!
|
||||
* Parses this frame as PropertyMap with a single key.
|
||||
/*! Parses this frame as PropertyMap with a single key.
|
||||
* - if description() is empty or "LYRICS", the key will be "LYRICS"
|
||||
* - if description() is not a valid PropertyMap key, the frame will be
|
||||
* marked unsupported by an entry "USLT/<description>" in the unsupportedData()
|
||||
|
||||
+43
-43
@@ -117,35 +117,35 @@ FileName File::name() const
|
||||
PropertyMap File::properties() const
|
||||
{
|
||||
// ugly workaround until this method is virtual
|
||||
if (dynamic_cast<const APE::File* >(this))
|
||||
if(dynamic_cast<const APE::File* >(this))
|
||||
return dynamic_cast<const APE::File* >(this)->properties();
|
||||
if (dynamic_cast<const FLAC::File* >(this))
|
||||
if(dynamic_cast<const FLAC::File* >(this))
|
||||
return dynamic_cast<const FLAC::File* >(this)->properties();
|
||||
if (dynamic_cast<const IT::File* >(this))
|
||||
if(dynamic_cast<const IT::File* >(this))
|
||||
return dynamic_cast<const IT::File* >(this)->properties();
|
||||
if (dynamic_cast<const Mod::File* >(this))
|
||||
if(dynamic_cast<const Mod::File* >(this))
|
||||
return dynamic_cast<const Mod::File* >(this)->properties();
|
||||
if (dynamic_cast<const MPC::File* >(this))
|
||||
if(dynamic_cast<const MPC::File* >(this))
|
||||
return dynamic_cast<const MPC::File* >(this)->properties();
|
||||
if (dynamic_cast<const MPEG::File* >(this))
|
||||
if(dynamic_cast<const MPEG::File* >(this))
|
||||
return dynamic_cast<const MPEG::File* >(this)->properties();
|
||||
if (dynamic_cast<const Ogg::FLAC::File* >(this))
|
||||
if(dynamic_cast<const Ogg::FLAC::File* >(this))
|
||||
return dynamic_cast<const Ogg::FLAC::File* >(this)->properties();
|
||||
if (dynamic_cast<const Ogg::Speex::File* >(this))
|
||||
if(dynamic_cast<const Ogg::Speex::File* >(this))
|
||||
return dynamic_cast<const Ogg::Speex::File* >(this)->properties();
|
||||
if (dynamic_cast<const Ogg::Vorbis::File* >(this))
|
||||
if(dynamic_cast<const Ogg::Vorbis::File* >(this))
|
||||
return dynamic_cast<const Ogg::Vorbis::File* >(this)->properties();
|
||||
if (dynamic_cast<const RIFF::AIFF::File* >(this))
|
||||
if(dynamic_cast<const RIFF::AIFF::File* >(this))
|
||||
return dynamic_cast<const RIFF::AIFF::File* >(this)->properties();
|
||||
if (dynamic_cast<const RIFF::WAV::File* >(this))
|
||||
if(dynamic_cast<const RIFF::WAV::File* >(this))
|
||||
return dynamic_cast<const RIFF::WAV::File* >(this)->properties();
|
||||
if (dynamic_cast<const S3M::File* >(this))
|
||||
if(dynamic_cast<const S3M::File* >(this))
|
||||
return dynamic_cast<const S3M::File* >(this)->properties();
|
||||
if (dynamic_cast<const TrueAudio::File* >(this))
|
||||
if(dynamic_cast<const TrueAudio::File* >(this))
|
||||
return dynamic_cast<const TrueAudio::File* >(this)->properties();
|
||||
if (dynamic_cast<const WavPack::File* >(this))
|
||||
if(dynamic_cast<const WavPack::File* >(this))
|
||||
return dynamic_cast<const WavPack::File* >(this)->properties();
|
||||
if (dynamic_cast<const XM::File* >(this))
|
||||
if(dynamic_cast<const XM::File* >(this))
|
||||
return dynamic_cast<const XM::File* >(this)->properties();
|
||||
// no specialized implementation available -> use generic one
|
||||
// - ASF: ugly format, largely undocumented, not worth implementing
|
||||
@@ -160,31 +160,31 @@ void File::removeUnsupportedProperties(const StringList &properties)
|
||||
{
|
||||
// here we only consider those formats that could possibly contain
|
||||
// unsupported properties
|
||||
if (dynamic_cast<APE::File* >(this))
|
||||
if(dynamic_cast<APE::File* >(this))
|
||||
dynamic_cast<APE::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<FLAC::File* >(this))
|
||||
else if(dynamic_cast<FLAC::File* >(this))
|
||||
dynamic_cast<FLAC::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<MPC::File* >(this))
|
||||
else if(dynamic_cast<MPC::File* >(this))
|
||||
dynamic_cast<MPC::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<MPEG::File* >(this))
|
||||
else if(dynamic_cast<MPEG::File* >(this))
|
||||
dynamic_cast<MPEG::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<Ogg::FLAC::File* >(this))
|
||||
else if(dynamic_cast<Ogg::FLAC::File* >(this))
|
||||
dynamic_cast<Ogg::FLAC::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<Ogg::Speex::File* >(this))
|
||||
else if(dynamic_cast<Ogg::Speex::File* >(this))
|
||||
dynamic_cast<Ogg::Speex::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<Ogg::Vorbis::File* >(this))
|
||||
else if(dynamic_cast<Ogg::Vorbis::File* >(this))
|
||||
dynamic_cast<Ogg::Vorbis::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<RIFF::AIFF::File* >(this))
|
||||
else if(dynamic_cast<RIFF::AIFF::File* >(this))
|
||||
dynamic_cast<RIFF::AIFF::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<RIFF::WAV::File* >(this))
|
||||
else if(dynamic_cast<RIFF::WAV::File* >(this))
|
||||
dynamic_cast<RIFF::WAV::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<S3M::File* >(this))
|
||||
else if(dynamic_cast<S3M::File* >(this))
|
||||
dynamic_cast<S3M::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<TrueAudio::File* >(this))
|
||||
else if(dynamic_cast<TrueAudio::File* >(this))
|
||||
dynamic_cast<TrueAudio::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<WavPack::File* >(this))
|
||||
else if(dynamic_cast<WavPack::File* >(this))
|
||||
dynamic_cast<WavPack::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else if (dynamic_cast<XM::File* >(this))
|
||||
else if(dynamic_cast<XM::File* >(this))
|
||||
dynamic_cast<XM::File* >(this)->removeUnsupportedProperties(properties);
|
||||
else
|
||||
tag()->removeUnsupportedProperties(properties);
|
||||
@@ -192,35 +192,35 @@ void File::removeUnsupportedProperties(const StringList &properties)
|
||||
|
||||
PropertyMap File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
if (dynamic_cast<APE::File* >(this))
|
||||
if(dynamic_cast<APE::File* >(this))
|
||||
return dynamic_cast<APE::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<FLAC::File* >(this))
|
||||
else if(dynamic_cast<FLAC::File* >(this))
|
||||
return dynamic_cast<FLAC::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<IT::File* >(this))
|
||||
else if(dynamic_cast<IT::File* >(this))
|
||||
return dynamic_cast<IT::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<Mod::File* >(this))
|
||||
else if(dynamic_cast<Mod::File* >(this))
|
||||
return dynamic_cast<Mod::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<MPC::File* >(this))
|
||||
else if(dynamic_cast<MPC::File* >(this))
|
||||
return dynamic_cast<MPC::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<MPEG::File* >(this))
|
||||
else if(dynamic_cast<MPEG::File* >(this))
|
||||
return dynamic_cast<MPEG::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<Ogg::FLAC::File* >(this))
|
||||
else if(dynamic_cast<Ogg::FLAC::File* >(this))
|
||||
return dynamic_cast<Ogg::FLAC::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<Ogg::Speex::File* >(this))
|
||||
else if(dynamic_cast<Ogg::Speex::File* >(this))
|
||||
return dynamic_cast<Ogg::Speex::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<Ogg::Vorbis::File* >(this))
|
||||
else if(dynamic_cast<Ogg::Vorbis::File* >(this))
|
||||
return dynamic_cast<Ogg::Vorbis::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<RIFF::AIFF::File* >(this))
|
||||
else if(dynamic_cast<RIFF::AIFF::File* >(this))
|
||||
return dynamic_cast<RIFF::AIFF::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<RIFF::WAV::File* >(this))
|
||||
else if(dynamic_cast<RIFF::WAV::File* >(this))
|
||||
return dynamic_cast<RIFF::WAV::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<S3M::File* >(this))
|
||||
else if(dynamic_cast<S3M::File* >(this))
|
||||
return dynamic_cast<S3M::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<TrueAudio::File* >(this))
|
||||
else if(dynamic_cast<TrueAudio::File* >(this))
|
||||
return dynamic_cast<TrueAudio::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<WavPack::File* >(this))
|
||||
else if(dynamic_cast<WavPack::File* >(this))
|
||||
return dynamic_cast<WavPack::File* >(this)->setProperties(properties);
|
||||
else if (dynamic_cast<XM::File* >(this))
|
||||
else if(dynamic_cast<XM::File* >(this))
|
||||
return dynamic_cast<XM::File* >(this)->setProperties(properties);
|
||||
else
|
||||
return tag()->setProperties(properties);
|
||||
|
||||
@@ -132,18 +132,18 @@ PropertyMap TrueAudio::File::properties() const
|
||||
{
|
||||
// once Tag::properties() is virtual, this case distinction could actually be done
|
||||
// within TagUnion.
|
||||
if (d->hasID3v2)
|
||||
if(d->hasID3v2)
|
||||
return d->tag.access<ID3v2::Tag>(ID3v2Index, false)->properties();
|
||||
if (d->hasID3v1)
|
||||
if(d->hasID3v1)
|
||||
return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->properties();
|
||||
return PropertyMap();
|
||||
}
|
||||
|
||||
PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
if (d->hasID3v2)
|
||||
if(d->hasID3v2)
|
||||
return d->tag.access<ID3v2::Tag>(ID3v2Index, false)->setProperties(properties);
|
||||
else if (d->hasID3v1)
|
||||
else if(d->hasID3v1)
|
||||
return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->setProperties(properties);
|
||||
else
|
||||
return d->tag.access<ID3v2::Tag>(ID3v2Index, true)->setProperties(properties);
|
||||
|
||||
@@ -108,18 +108,18 @@ TagLib::Tag *WavPack::File::tag() const
|
||||
|
||||
PropertyMap WavPack::File::properties() const
|
||||
{
|
||||
if (d->hasAPE)
|
||||
if(d->hasAPE)
|
||||
return d->tag.access<APE::Tag>(APEIndex, false)->properties();
|
||||
if (d->hasID3v1)
|
||||
if(d->hasID3v1)
|
||||
return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->properties();
|
||||
return PropertyMap();
|
||||
}
|
||||
|
||||
PropertyMap WavPack::File::setProperties(const PropertyMap &properties)
|
||||
{
|
||||
if (d->hasAPE)
|
||||
if(d->hasAPE)
|
||||
return d->tag.access<APE::Tag>(APEIndex, false)->setProperties(properties);
|
||||
else if (d->hasID3v1)
|
||||
else if(d->hasID3v1)
|
||||
return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->setProperties(properties);
|
||||
else
|
||||
return d->tag.access<APE::Tag>(APE, true)->setProperties(properties);
|
||||
|
||||
Reference in New Issue
Block a user