From 2c29fbeabbd2bd43c8ede9223993beab3edf623d Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sun, 3 Jan 2021 18:58:29 +0100 Subject: [PATCH] Use mapped roles instead of property keys for TIPL roles For an ID3v2 "DJMIXER" property, the "DJ-MIX" TIPL role must be used. For an ID3v2 "MIXER" property, the "MIX" TIPL role must be used. Otherwise it will not work when reading the tag and creating properties from the wrong TIPL roles. --- taglib/mpeg/id3v2/frames/textidentificationframe.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp index 9b1eacd1..39019e61 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp @@ -63,7 +63,10 @@ TextIdentificationFrame *TextIdentificationFrame::createTIPLFrame(const Property TextIdentificationFrame *frame = new TextIdentificationFrame("TIPL"); StringList l; for(PropertyMap::ConstIterator it = properties.begin(); it != properties.end(); ++it){ - l.append(it->first); + const String role = involvedPeopleMap()[it->first]; + if(role.isEmpty()) // should not happen + continue; + l.append(role); l.append(it->second.toString(",")); // comma-separated list of names } frame->setText(l);