MP4: Use rate atom for RATING property (#1444)

This commit is contained in:
MinnieTheMoocher
2026-09-30 18:57:11 +02:00
committed by GitHub
parent 5bd11b2fb6
commit 9174df7bf6
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -380,6 +380,7 @@ Map<ByteVector, String> ItemFactory::namePropertyMap() const
{"disk", "DISCNUMBER"},
{"cpil", "COMPILATION"},
{"tmpo", "BPM"},
{"rate", "RATING"},
{"cprt", "COPYRIGHT"},
{"\251lyr", "LYRICS"},
{"\251too", "ENCODING"},
+1
View File
@@ -92,6 +92,7 @@ namespace TagLib {
* - ISRC
* - ASIN
* - BPM
* - RATING
* - COPYRIGHT
* - ENCODEDBY
* - MOOD
+8
View File
@@ -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"]);