Make PropertyMap::unsupportedData() const

This commit is contained in:
Urs Fleisch
2023-11-24 06:58:49 +01:00
parent 3d67b139e4
commit 8b564baf01
11 changed files with 28 additions and 19 deletions

View File

@@ -209,7 +209,7 @@ PropertyMap ChapterFrame::asProperties() const
{
PropertyMap map;
map.unsupportedData().append(frameID() + String("/") + d->elementID);
map.addUnsupportedData(frameID() + String("/") + d->elementID);
return map;
}

View File

@@ -236,7 +236,7 @@ PropertyMap TableOfContentsFrame::asProperties() const
{
PropertyMap map;
map.unsupportedData().append(frameID() + String("/") + d->elementID);
map.addUnsupportedData(frameID() + String("/") + d->elementID);
return map;
}

View File

@@ -171,7 +171,7 @@ PropertyMap TextIdentificationFrame::asProperties() const
PropertyMap map;
String tagName = frameIDToKey(frameID());
if(tagName.isEmpty()) {
map.unsupportedData().append(frameID());
map.addUnsupportedData(frameID());
return map;
}
StringList values = fieldList();
@@ -304,7 +304,7 @@ PropertyMap TextIdentificationFrame::makeTIPLProperties() const
PropertyMap map;
if(fieldList().size() % 2 != 0){
// according to the ID3 spec, TIPL must contain an even number of entries
map.unsupportedData().append(frameID());
map.addUnsupportedData(frameID());
return map;
}
const StringList l = fieldList();
@@ -317,7 +317,7 @@ PropertyMap TextIdentificationFrame::makeTIPLProperties() const
else {
// invalid involved role -> mark whole frame as unsupported in order to be consistent with writing
map.clear();
map.unsupportedData().append(frameID());
map.addUnsupportedData(frameID());
return map;
}
}
@@ -329,7 +329,7 @@ PropertyMap TextIdentificationFrame::makeTMCLProperties() const
PropertyMap map;
if(fieldList().size() % 2 != 0){
// according to the ID3 spec, TMCL must contain an even number of entries
map.unsupportedData().append(frameID());
map.addUnsupportedData(frameID());
return map;
}
const StringList l = fieldList();
@@ -338,7 +338,7 @@ PropertyMap TextIdentificationFrame::makeTMCLProperties() const
if(instrument.isEmpty()) {
// instrument is not a valid key -> frame unsupported
map.clear();
map.unsupportedData().append(frameID());
map.addUnsupportedData(frameID());
return map;
}
map.insert(L"PERFORMER:" + instrument, (++it)->split(","));

View File

@@ -95,7 +95,7 @@ PropertyMap UniqueFileIdentifierFrame::asProperties() const
map.insert("MUSICBRAINZ_TRACKID", String(d->identifier));
}
else {
map.unsupportedData().append(frameID() + String("/") + d->owner);
map.addUnsupportedData(frameID() + String("/") + d->owner);
}
return map;
}

View File

@@ -90,7 +90,7 @@ PropertyMap UrlLinkFrame::asProperties() const
PropertyMap map;
if(key.isEmpty())
// unknown W*** frame - this normally shouldn't happen
map.unsupportedData().append(frameID());
map.addUnsupportedData(frameID());
else
map.insert(key, url());
return map;

View File

@@ -364,12 +364,12 @@ PropertyMap Frame::asProperties() const
{
if(dynamic_cast< const UnknownFrame *>(this)) {
PropertyMap m;
m.unsupportedData().append("UNKNOWN/" + frameID());
m.addUnsupportedData("UNKNOWN/" + frameID());
return m;
}
const ByteVector &id = frameID();
PropertyMap m;
m.unsupportedData().append(id);
m.addUnsupportedData(id);
return m;
}