Re: ID3 writeback fails (Invalid Language in COMM)

Matt McClure <[email protected]>
Newsgroups gmane.comp.audio.netjuke.user
Organization me
Message-ID <[email protected]>
Matt McClure wrote:
> I'm trying to use the new Edit Media mode in 1.0b17.  All my MP3s were
> encoded with ID3v2 tags using Grip/Lame.  If I try to change the Track
> Name in Netjuke, when I save, it says:
> 
> Invalid Language in COMM ( )
> GenerateID3v2FrameData() failed for "COMM"
> Error generated in getID3() v1.6.1
> GenerateID3v2Tag() failed
> 
> Looking at the MP3, there doesn't appear to be a language in the COMM
> field.  Is this legal?  Is there a bug in getid3, or is it a bug in Lame?

I worked around this by applying the attached patch to
getid3.frames.php.  However, now it seems that the writeback only writes
the first 30 characters of the TIT2 track name tag to the MP3.
Shouldn't it write an arbitrary length string in the ID3v2 tag?

-- 
Matt
http://www.faradic.net/~mmcclure/

    The whole genre of the one-bedroom apartment on the Lower East
    Side has escaped the [MTV] Cribs radar.
        -Mike Doughty
COMM-invalid-language.patch (text/plain, 470 B)
--- getid3.frames.php.dist	2003-03-07 11:55:38.000000000 -0500
+++ getid3.frames.php	2003-03-16 21:52:11.000000000 -0500
@@ -1851,7 +1851,7 @@
 
 function LanguageLookup($languagecode, $casesensitive=false) {
 	// ISO 639-2 - http://www.id3.org/iso639-2.html
-	if ($languagecode == 'XXX') {
+	if ($languagecode == 'XXX' || $languagecode == "\0\0\0") {
 		return 'unknown';
 	}
 	if (!$casesensitive) {
@@ -2764,4 +2764,4 @@
 	}
 }
 
-?>
\ No newline at end of file
+?>
signature.asc (application/pgp-signature, 250 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+dTxMrGgMpZIoLA8RAi9iAKCiZ+ByzvdS+0JbFNPn88SgATE91QCg1Zyh
/Pp3WyvNPHbWI5AXKA0V1sI=
=MSbl
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.