fixed the utf-8 id3v2 tag reading bug
This commit is contained in:
parent
e806ca5f3b
commit
6f2cf9ba0a
3 changed files with 11 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.28 $
|
Version : $Revision: 1.29 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClip.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClip.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -637,7 +637,7 @@ AudioClip :: readTag(Ptr<MetadataTypeContainer>::Ref metadataTypes)
|
||||||
TagLib::ID3v2::FrameList frameList = it->second;
|
TagLib::ID3v2::FrameList frameList = it->second;
|
||||||
if (!frameList.isEmpty()) {
|
if (!frameList.isEmpty()) {
|
||||||
value.reset(new const Glib::ustring(
|
value.reset(new const Glib::ustring(
|
||||||
frameList.front()->toString().to8Bit(true)));
|
frameList.front()->toString().to8Bit(false)));
|
||||||
setMetadata(value, *metadata->getDcName());
|
setMetadata(value, *metadata->getDcName());
|
||||||
}
|
}
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.15 $
|
Version : $Revision: 1.16 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClipTest.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClipTest.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -227,6 +227,10 @@ AudioClipTest :: tagTest(void)
|
||||||
= audioClip->getMetadata("dc:creator");
|
= audioClip->getMetadata("dc:creator");
|
||||||
CPPUNIT_ASSERT(*artist == "The Muppets");
|
CPPUNIT_ASSERT(*artist == "The Muppets");
|
||||||
|
|
||||||
|
Ptr<const Glib::ustring>::Ref album
|
||||||
|
= audioClip->getMetadata("dc:source");
|
||||||
|
CPPUNIT_ASSERT(*album == "מוישה אופניק");
|
||||||
|
|
||||||
// ... or with URI
|
// ... or with URI
|
||||||
uri.reset(new std::string("file:var/test10001.mp3"));
|
uri.reset(new std::string("file:var/test10001.mp3"));
|
||||||
audioClip->setUri(uri);
|
audioClip->setUri(uri);
|
||||||
|
@ -241,6 +245,10 @@ AudioClipTest :: tagTest(void)
|
||||||
|
|
||||||
artist = audioClip->getMetadata("dc:creator");
|
artist = audioClip->getMetadata("dc:creator");
|
||||||
CPPUNIT_ASSERT(*artist == "The Muppets");
|
CPPUNIT_ASSERT(*artist == "The Muppets");
|
||||||
|
|
||||||
|
album = audioClip->getMetadata("dc:source");
|
||||||
|
CPPUNIT_ASSERT(*album == "מוישה אופניק");
|
||||||
|
// Moshe Offnik is the Israeli/Palestinian version of Oscar The Grouch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue