mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Try to work around iTunes putting binary data in a comments field by
preferring a comment without an empty description. FEATURE:137553 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@768865 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
54202bfd5c
commit
5aa1b606aa
@ -118,9 +118,18 @@ String ID3v2::Tag::album() const
|
||||
|
||||
String ID3v2::Tag::comment() const
|
||||
{
|
||||
if(!d->frameListMap["COMM"].isEmpty())
|
||||
return d->frameListMap["COMM"].front()->toString();
|
||||
return String::null;
|
||||
const FrameList &comments = d->frameListMap["COMM"];
|
||||
|
||||
if(comments.isEmpty())
|
||||
return String::null;
|
||||
|
||||
for(FrameList::ConstIterator it = comments.begin(); it != comments.end(); ++it)
|
||||
{
|
||||
if(static_cast<CommentsFrame *>(*it)->description().isEmpty())
|
||||
return (*it)->toString();
|
||||
}
|
||||
|
||||
return comments.front()->toString();
|
||||
}
|
||||
|
||||
String ID3v2::Tag::genre() const
|
||||
|
Loading…
Reference in New Issue
Block a user