Upgrade IPLS (2.3) to TIPL (2.4)

This commit is contained in:
Lukáš Lalinský 2011-04-05 17:08:25 +02:00
parent 3715b96477
commit 8878c9158c
2 changed files with 3 additions and 2 deletions

View File

@ -153,7 +153,7 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader)
// Text Identification (frames 4.2)
if(frameID.startsWith("T") || frameID == "IPLS") {
if(frameID.startsWith("T")) {
TextIdentificationFrame *f = frameID != "TXXX"
? new TextIdentificationFrame(data, header)
@ -368,6 +368,7 @@ bool FrameFactory::updateFrame(Frame::Header *header) const
convertFrame("TORY", "TDOR", header);
convertFrame("TYER", "TDRC", header);
convertFrame("IPLS", "TIPL", header);
break;
}

View File

@ -513,7 +513,7 @@ public:
CPPUNIT_ASSERT(tf);
CPPUNIT_ASSERT_EQUAL(TagLib::uint(1), tf->fieldList().size());
CPPUNIT_ASSERT_EQUAL(String("2012"), tf->fieldList().front());
tf = dynamic_cast<ID3v2::TextIdentificationFrame *>(bar.ID3v2Tag()->frameList("IPLS").front());
tf = dynamic_cast<ID3v2::TextIdentificationFrame *>(bar.ID3v2Tag()->frameList("TIPL").front());
CPPUNIT_ASSERT(tf);
CPPUNIT_ASSERT_EQUAL(TagLib::uint(8), tf->fieldList().size());
CPPUNIT_ASSERT_EQUAL(String("Guitar"), tf->fieldList()[0]);