Summary: | tooltip with meta data should be a little more intelligent | ||
---|---|---|---|
Product: | [Applications] kfile-plugins | Reporter: | Thomas Zander <zander> |
Component: | mp3 | Assignee: | Multimedia Developers <kde-multimedia> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | tooltip with mostly empty rows. |
Description
Thomas Zander
2004-10-02 22:35:06 UTC
Created attachment 7765 [details]
tooltip with mostly empty rows.
A picture describes it best.
> I would appreciate it if fields that are empty are not shown in the tooltip.
They are not shown, your mp3 must contain some non-printing garbage.
The theory that they contain some non-printing stuff is incorrect. I just opened the properties for this dialog and put some little text in each field and pressed OK. Then I opened the dialog again and this time I removed all the texts and fields. The result was the same as the picture shows. So unless you also think the properties dialog puts non-printable garbage in my MP3, this theory is debunked. Next; I took a perfectly correct MP3 and removed all the fields with the same result (I only can't remove the Genre, but OK). No idea if its relevant; but doing the same thing on an ogg does have the correct result. 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); } Commit did indeed fix bug. |