@@ -1265,6 +1265,38 @@ class TestID3v2 : public CppUnit::TestFixture
12651265 CPPUNIT_ASSERT_EQUAL (static_cast <ID3v2::UserTextIdentificationFrame *>(nullptr ), ID3v2::UserTextIdentificationFrame::find (&tag, " non existing" ));
12661266 CPPUNIT_ASSERT_EQUAL (frame10, ID3v2::CommentsFrame::findByDescription (&tag, " iTunNORM" ));
12671267 CPPUNIT_ASSERT_EQUAL (static_cast <ID3v2::CommentsFrame *>(nullptr ), ID3v2::CommentsFrame::findByDescription (&tag, " non existing" ));
1268+
1269+ // Check if the allowed TIPL keys are correctly mapped to properties.
1270+ // These are the keys used by MusicBrainz: arranger, engineer, producer, DJ-mix, mix.
1271+ // See https://picard-docs.musicbrainz.org/downloads/MusicBrainz_Picard_Tag_Map.html.
1272+ // MusicBrainz Picard uses lowercase keys whereas TagLib used uppercase keys.
1273+ auto frame11 = new ID3v2::TextIdentificationFrame (" TIPL" );
1274+ StringList tiplData;
1275+ tiplData.append (" arranger" );
1276+ tiplData.append (" an arranger" );
1277+ tiplData.append (" ENGINEER" );
1278+ tiplData.append (" an engineer" );
1279+ tiplData.append (" producer" );
1280+ tiplData.append (" a producer" );
1281+ tiplData.append (" DJ-mix" );
1282+ tiplData.append (" a DJ mixer" );
1283+ tiplData.append (" mix" );
1284+ tiplData.append (" a mixer" );
1285+ frame11->setText (tiplData);
1286+ tag.addFrame (frame11);
1287+
1288+ properties = tag.properties ();
1289+ CPPUNIT_ASSERT_EQUAL (0u , properties.unsupportedData ().size ());
1290+ CPPUNIT_ASSERT (properties.contains (" ARRANGER" ));
1291+ CPPUNIT_ASSERT (properties.contains (" ENGINEER" ));
1292+ CPPUNIT_ASSERT (properties.contains (" PRODUCER" ));
1293+ CPPUNIT_ASSERT (properties.contains (" DJMIXER" ));
1294+ CPPUNIT_ASSERT (properties.contains (" MIXER" ));
1295+ CPPUNIT_ASSERT_EQUAL (String (" an arranger" ), properties[" ARRANGER" ].front ());
1296+ CPPUNIT_ASSERT_EQUAL (String (" an engineer" ), properties[" ENGINEER" ].front ());
1297+ CPPUNIT_ASSERT_EQUAL (String (" a producer" ), properties[" PRODUCER" ].front ());
1298+ CPPUNIT_ASSERT_EQUAL (String (" a DJ mixer" ), properties[" DJMIXER" ].front ());
1299+ CPPUNIT_ASSERT_EQUAL (String (" a mixer" ), properties[" MIXER" ].front ());
12681300 }
12691301
12701302 void testPropertiesMovement ()
0 commit comments