[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 90674] tooltip with meta data should be a little more
From:       Brad Hards <bradh () frogmouth ! net>
Date:       2004-12-05 5:32:05
Message-ID: 20041205053205.32101.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
        
http://bugs.kde.org/show_bug.cgi?id=90674        




------- Additional Comments From bradh frogmouth net  2004-12-05 06:32 -------
CVS commit by bhards: 

Handle empty (but not null) entries from mp3 files. I don't have a lot of
mp3s, so I could only test with the ones from kbattleship :-)

Thomas: can you update kdemultimedia/kfile-plugins/mp3 and test
if this is still a problem?

CCMAIL:90674 bugs kde org


  M +15 -5     kfile_mp3.cpp   1.71


--- kdemultimedia/kfile-plugins/mp3/kfile_mp3.cpp  #1.70:1.71
 @ -154,11 +154,21  @ bool KMp3Plugin::readInfo(KFileMetaInfo 
         QString track = file.tag()->track() > 0 ? QString::number(file.tag()->track()) : QString::null;
 
-        appendItem(id3group, "Title",       TStringToQString(file.tag()->title()).stripWhiteSpace());
-        appendItem(id3group, "Artist",      TStringToQString(file.tag()->artist()).stripWhiteSpace());
-        appendItem(id3group, "Album",       TStringToQString(file.tag()->album()).stripWhiteSpace());
+        QString title = TStringToQString(file.tag()->title()).stripWhiteSpace();
+        if (!title.isEmpty())
+            appendItem(id3group, "Title", title);
+        QString artist = TStringToQString(file.tag()->artist()).stripWhiteSpace();
+        if (!artist.isEmpty())
+            appendItem(id3group, "Artist", artist);
+        QString album = TStringToQString(file.tag()->album()).stripWhiteSpace();
+        if (!album.isEmpty())
+            appendItem(id3group, "Album", album);
         appendItem(id3group, "Date",        date);
-        appendItem(id3group, "Comment",     TStringToQString(file.tag()->comment()).stripWhiteSpace());
+        QString comment = TStringToQString(file.tag()->comment()).stripWhiteSpace();
+        if (!comment.isEmpty())
+            appendItem(id3group, "Comment", comment);
         appendItem(id3group, "Tracknumber", track);
-        appendItem(id3group, "Genre",       TStringToQString(file.tag()->genre()).stripWhiteSpace());
+        QString genre = TStringToQString(file.tag()->genre()).stripWhiteSpace();
+        if (!genre.isEmpty())
+            appendItem(id3group, "Genre", genre);
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic