mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 04:54:19 -04:00
Don't upgrade ID3v2.2 TDA frame when upgrading to TRCD
We already do this for TDAT. Using both parts, the year and the date, would be better we the code currently doesn't have enough context to do that. BUG:228968 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1110552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
BIN
tests/data/id3v22-tda.mp3
Normal file
BIN
tests/data/id3v22-tda.mp3
Normal file
Binary file not shown.
@ -59,6 +59,8 @@ class TestID3v2 : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testUpdateGenre23_1);
|
||||
CPPUNIT_TEST(testUpdateGenre23_2);
|
||||
CPPUNIT_TEST(testUpdateGenre24);
|
||||
CPPUNIT_TEST(testUpdateDate22);
|
||||
// CPPUNIT_TEST(testUpdateFullDate22); TODO TYE+TDA should be upgraded to TDRC together
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -439,6 +441,20 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(String("R&B Eurodisco"), tag.genre());
|
||||
}
|
||||
|
||||
void testUpdateDate22()
|
||||
{
|
||||
MPEG::File f("data/id3v22-tda.mp3", false);
|
||||
CPPUNIT_ASSERT(f.tag());
|
||||
CPPUNIT_ASSERT_EQUAL(TagLib::uint(2010), f.tag()->year());
|
||||
}
|
||||
|
||||
void testUpdateFullDate22()
|
||||
{
|
||||
MPEG::File f("data/id3v22-tda.mp3", false);
|
||||
CPPUNIT_ASSERT(f.tag());
|
||||
CPPUNIT_ASSERT_EQUAL(String("2010-04-03"), f.ID3v2Tag()->frameListMap()["TDRC"].front()->toString());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestID3v2);
|
||||
|
Reference in New Issue
Block a user