Implement missing AIFF::File::hasID3v2Tag().

This commit is contained in:
Tsuda Kageyu
2015-01-05 18:20:31 +09:00
parent 2b0a540228
commit c6a63a3a2f
2 changed files with 30 additions and 2 deletions

View File

@ -39,7 +39,8 @@ public:
FilePrivate() :
properties(0),
tag(0),
tagChunkID("ID3 ")
tagChunkID("ID3 "),
hasID3v2(false)
{
}
@ -53,6 +54,8 @@ public:
Properties *properties;
ID3v2::Tag *tag;
ByteVector tagChunkID;
bool hasID3v2;
};
////////////////////////////////////////////////////////////////////////////////
@ -100,7 +103,6 @@ PropertyMap RIFF::AIFF::File::setProperties(const PropertyMap &properties)
return d->tag->setProperties(properties);
}
RIFF::AIFF::Properties *RIFF::AIFF::File::audioProperties() const
{
return d->properties;
@ -119,10 +121,15 @@ bool RIFF::AIFF::File::save()
}
setChunkData(d->tagChunkID, d->tag->render());
d->hasID3v2 = true;
return true;
}
bool RIFF::AIFF::File::hasID3v2Tag() const
{
return d->hasID3v2;
}
////////////////////////////////////////////////////////////////////////////////
// private members
@ -134,6 +141,7 @@ void RIFF::AIFF::File::read(bool readProperties, Properties::ReadStyle propertie
if(chunkName(i) == "ID3 " || chunkName(i) == "id3 ") {
d->tagChunkID = chunkName(i);
d->tag = new ID3v2::Tag(this, chunkOffset(i));
d->hasID3v2 = true;
}
else if(chunkName(i) == "COMM" && readProperties)
d->properties = new Properties(chunkData(i), propertiesStyle);