diff --git a/taglib/mp4/mp4itemfactory.cpp b/taglib/mp4/mp4itemfactory.cpp index e2747f0a..486ebc42 100644 --- a/taglib/mp4/mp4itemfactory.cpp +++ b/taglib/mp4/mp4itemfactory.cpp @@ -380,6 +380,7 @@ Map ItemFactory::namePropertyMap() const {"disk", "DISCNUMBER"}, {"cpil", "COMPILATION"}, {"tmpo", "BPM"}, + {"rate", "RATING"}, {"cprt", "COPYRIGHT"}, {"\251lyr", "LYRICS"}, {"\251too", "ENCODING"}, diff --git a/taglib/toolkit/tpropertymap.h b/taglib/toolkit/tpropertymap.h index f21c526b..461debae 100644 --- a/taglib/toolkit/tpropertymap.h +++ b/taglib/toolkit/tpropertymap.h @@ -92,6 +92,7 @@ namespace TagLib { * - ISRC * - ASIN * - BPM + * - RATING * - COPYRIGHT * - ENCODEDBY * - MOOD diff --git a/tests/test_mp4.cpp b/tests/test_mp4.cpp index 52e3f8fb..dfb90f0b 100644 --- a/tests/test_mp4.cpp +++ b/tests/test_mp4.cpp @@ -607,6 +607,14 @@ public: CPPUNIT_ASSERT_EQUAL(123, f.tag()->item("tmpo").toInt()); CPPUNIT_ASSERT_EQUAL(StringList("123"), tags["BPM"]); + tags["RATING"] = StringList("80"); + f.setProperties(tags); + + tags = f.properties(); + + CPPUNIT_ASSERT(f.tag()->contains("rate")); + CPPUNIT_ASSERT_EQUAL(StringList("80"), tags["RATING"]); + CPPUNIT_ASSERT(f.tag()->contains("\251ART")); CPPUNIT_ASSERT_EQUAL(StringList("Foo Bar"), f.tag()->item("\251ART").toStringList()); CPPUNIT_ASSERT_EQUAL(StringList("Foo Bar"), tags["ARTIST"]);