mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Revert "Use always "COMMENT" field when updating XiphComment."
This reverts commit ba5137bf2d3b1bcca9269e3a7f5f194243c87d23.
This commit is contained in:
parent
8f147034d6
commit
7d0a651f3e
@ -36,6 +36,7 @@ class Ogg::XiphComment::XiphCommentPrivate
|
||||
public:
|
||||
FieldListMap fieldListMap;
|
||||
String vendorID;
|
||||
String commentField;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -81,10 +82,16 @@ String Ogg::XiphComment::album() const
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -130,8 +137,14 @@ void Ogg::XiphComment::setAlbum(const String &s)
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user