mirror of
https://github.com/taglib/taglib.git
synced 2026-02-28 11:03:03 -05:00
Avoid duplicates in StringList Matroska::Tag::complexPropertyKeys()
When using for example examples/tagwriter -C GENRE \ "name=GENRE,targetTypeValue=50,value=Soft Rock;name=GENRE,targetTypeValue=50,value=Classic Rock" \ path/to/file.mka the GENRE key was included twice and tagreader displayed the two genre tags twice.
This commit is contained in:
@ -551,10 +551,11 @@ StringList Matroska::Tag::complexPropertyKeys() const
|
||||
{
|
||||
StringList keys;
|
||||
for(const SimpleTag &t : std::as_const(d->tags)) {
|
||||
if(t.type() != SimpleTag::StringType ||
|
||||
t.trackUid() != 0 || t.editionUid() != 0 ||
|
||||
t.chapterUid() != 0 || t.attachmentUid() != 0 ||
|
||||
translateTag(t.name(), t.targetTypeValue()).isEmpty()) {
|
||||
if((t.type() != SimpleTag::StringType ||
|
||||
t.trackUid() != 0 || t.editionUid() != 0 ||
|
||||
t.chapterUid() != 0 || t.attachmentUid() != 0 ||
|
||||
translateTag(t.name(), t.targetTypeValue()).isEmpty()) &&
|
||||
!keys.contains(t.name())) {
|
||||
keys.append(t.name());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user