[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/taglib
From: Lukáš Lalinský <lalinsky () gmail ! com>
Date: 2010-04-03 16:58:03
Message-ID: 20100403165803.A4541AC88D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1110552 by lalinsky:
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
M +2 -2 taglib/mpeg/id3v2/id3v2framefactory.cpp
AM tests/data/id3v22-tda.mp3
M +16 -0 tests/test_id3v2.cpp
--- trunk/kdesupport/taglib/taglib/mpeg/id3v2/id3v2framefactory.cpp #1110551:1110552
@@ -282,7 +282,8 @@
frameID == "LNK" ||
frameID == "RVA" ||
frameID == "TIM" ||
- frameID == "TSI")
+ frameID == "TSI" ||
+ frameID == "TDA")
{
debug("ID3v2.4 no longer supports the frame type " + String(frameID) +
". It will be discarded from the tag.");
@@ -310,7 +311,6 @@
convertFrame("TCM", "TCOM", header);
convertFrame("TCO", "TCON", header);
convertFrame("TCR", "TCOP", header);
- convertFrame("TDA", "TDRC", header);
convertFrame("TDY", "TDLY", header);
convertFrame("TEN", "TENC", header);
convertFrame("TFT", "TFLT", header);
--- trunk/kdesupport/taglib/tests/test_id3v2.cpp #1110551:1110552
@@ -59,6 +59,8 @@
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 @@
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);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic