public:
FieldListMap fieldListMap;
String vendorID;
+ String commentField;
};
////////////////////////////////////////////////////////////////////////////////
String Ogg::XiphComment::comment() const
{
- if(!d->fieldListMap["COMMENT"].isEmpty())
- return d->fieldListMap["COMMENT"].toString();
- if(!d->fieldListMap["DESCRIPTION"].isEmpty())
+ if(!d->fieldListMap["DESCRIPTION"].isEmpty()) {
+ d->commentField = "DESCRIPTION";
return d->fieldListMap["DESCRIPTION"].toString();
+ }
+
+ if(!d->fieldListMap["COMMENT"].isEmpty()) {
+ d->commentField = "COMMENT";
+ return d->fieldListMap["COMMENT"].toString();
+ }
+
return String::null;
}
void Ogg::XiphComment::setComment(const String &s)
{
- removeField("DESCRIPTION");
- addField("COMMENT", s);
+ if(d->commentField.isEmpty()) {
+ if(!d->fieldListMap["DESCRIPTION"].isEmpty())
+ d->commentField = "DESCRIPTION";
+ else
+ d->commentField = "COMMENT";
+ }
+
+ addField(d->commentField, s);
}
void Ogg::XiphComment::setGenre(const String &s)