Bug 75008 - noatun adds 31 spaces after text fields in id3v2 tags
Summary: noatun adds 31 spaces after text fields in id3v2 tags
Status: RESOLVED FIXED
Alias: None
Product: kfile-plugins
Classification: Applications
Component: mp3 (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Multimedia Developers
URL:
Keywords:
: 75009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-11 22:04 UTC by Anno V. Heimburg
Modified: 2004-05-05 13:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anno V. Heimburg 2004-02-11 22:04:33 UTC
Version:           2.4.0 (using KDE 3.2.0, Gentoo)
Compiler:          gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)
OS:          Linux (i686) release 2.4.22-gentoo-r4

KDE 3.2's noatun adds 31 spaces after any text fields in those mp3.files that are tagged with a id3v2 tag. mp3s only tagged with an id3v1 tag, ogg files etc. are not affected. As far as I can tell, removing the spaces in the properties/meta-info sheet of the file and then clicking ok corrects that, it will not readd the spaces.

The files have been tagged using the id3tag program. Other programs, whether xmms, mgpg123, juk or id3info don't display the spaces.

Don't give up on noatun - and contact Stefan Gehn whether he would like to integrate his FlexPlaylist with noatun, it's pretty good.

P.S.: Yes, the error is independent of the playlist plugin used.
Comment 1 Stefan Gehn 2004-02-11 22:11:34 UTC
*** Bug 75009 has been marked as a duplicate of this bug. ***
Comment 2 Stefan Gehn 2004-02-11 22:17:40 UTC
> KDE 3.2's noatun adds 31 spaces after any text fields in those mp3.files
> that are tagged with a id3v2 tag. mp3s only tagged with an id3v1 tag, ogg
> files etc. are not affected
I think it's exactly the other way round. Only id3v1 tags should be affected because many tag writers fill up the tag with spaces instead of null-bytes (null-bytes is what the tag documentation says should be used).
id3v2 tags work differently and have variable sized fields and thus cannot show such a problem.

Btw, I know how and where to fix the bug but I would like to wait for another comment by Scott Wheeler first as he is the master of taglib and knows more of id3 tags than I do :)

off-topic part:
> Don't give up on noatun - and contact Stefan Gehn whether he would like to 
> integrate his FlexPlaylist with noatun, it's pretty good.
It's meant to be external to Noatun so I can do releases more often :)
Also it kind of duplicates the default splitplaylist.
Comment 3 Anno V. Heimburg 2004-02-11 22:37:52 UTC
Thanks for the fast answer. I'll refrain from editing all my id3-infos in this case.
Comment 4 Anno V. Heimburg 2004-02-12 05:50:31 UTC
I double-checked the idv1-vs-idv2-issue, and you're right. The problem is the id2v1-only songs. Somehow got my logical deductions around backwards.
Comment 5 Scott Wheeler 2004-02-12 09:20:24 UTC
Ok, I'm not entirely sure what you're seeing here, but there are pretty strong odds on the tagger you used doing things wrong.

The only reason that the others might be seeming to handle this better is that they explicitly strip spaces (JuK does that) just because there are so many taggers that do this wrong.

Now if I understand what you're saying -- it sounds like you found a tagger that did things wrong with the ID3v1 tags and then something else that copied the wrong version into the ID3v2 tags, or something like that.
Comment 6 Anno V. Heimburg 2004-02-12 09:37:18 UTC
Let me clarify a bit:

1. The problem only pertains to songs that have only an id3v1-tag. I changed my tagger sometime ago, and the newer songs with both id3v1 and id3v2-tags render okay

2. I had id3convert run over all of my songs and had it copy id3v1-info into the id3v2-tag if no id3v2-tag existed. After doing that, everything is back to normal

3. The reason that I filed a bug is that (a) noatun didn't do this in kde-3.1 and (2) most other players seem to handle the bad tags well enough. If you think broken taggers are a user and not a noatun problem, you can close this bug. However, I suggest you "fix" this as it will lead unsuspecting users to believe that noatun is broken some way (as it did me).
Comment 7 Scott Wheeler 2004-05-05 13:03:06 UTC
CVS commit by wheeler: 

Backporting:

Work around broken taggers padding ID3v1 tags with spaces rather than null.

CCMAIL:75008-done@bugs.kde.org


  M +5 -5      kfile_mp3.cpp   1.67.2.1


--- kdemultimedia/kfile-plugins/mp3/kfile_mp3.cpp  #1.67:1.67.2.1
@@ -155,11 +155,11 @@ bool KMp3Plugin::readInfo( KFileMetaInfo
         QString track = file.tag()->track() > 0 ? QString::number(file.tag()->track()) : QString::null;
 
-        appendItem(id3group, "Title",       TStringToQString(file.tag()->title()));
-        appendItem(id3group, "Artist",      TStringToQString(file.tag()->artist()));
-        appendItem(id3group, "Album",       TStringToQString(file.tag()->album()));
+        appendItem(id3group, "Title",       TStringToQString(file.tag()->title()).stripWhiteSpace());
+        appendItem(id3group, "Artist",      TStringToQString(file.tag()->artist()).stripWhiteSpace());
+        appendItem(id3group, "Album",       TStringToQString(file.tag()->album()).stripWhiteSpace());
         appendItem(id3group, "Date",        date);
-        appendItem(id3group, "Comment",     TStringToQString(file.tag()->comment()));
+        appendItem(id3group, "Comment",     TStringToQString(file.tag()->comment()).stripWhiteSpace());
         appendItem(id3group, "Tracknumber", track);
-        appendItem(id3group, "Genre",       TStringToQString(file.tag()->genre()));
+        appendItem(id3group, "Genre",       TStringToQString(file.tag()->genre()).stripWhiteSpace());
     }