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 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?

I looked a bit closer.  It seems the new ID3v2 data structure wasn't set
up correctly, so it didn't merge well with the old one.  As a result,
the old data was being used.  The patch attached fixes it.

One more bug to report though... after editing track info, the "Refresh"
button only reads the first 30 characters of the track name tag.
Looking at the MP3 itself, I can see the whole string is present in the
tag (40 characters).

-- 
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
new_id3v2_data.patch (text/plain, 1.6 KB)
--- inc-admin.php~	2003-03-07 11:55:38.000000000 -0500
+++ inc-admin.php	2003-03-16 23:15:29.000000000 -0500
@@ -601,17 +601,17 @@
 
     if ($dbrs->RecordCount() != 0) {
 
-      $data['id3']['id3v2']['TIT2']['data'] = $dbrs->fields[0];
-		  $data['id3']['id3v2']['TPE1']['data'] = $dbrs->fields[1];
-      $data['id3']['id3v2']['TALB']['data'] = $dbrs->fields[2];
-      $data['id3']['id3v2']['TRCK']['data'] = $dbrs->fields[3];
-      $data['id3']['id3v2']['TIT1']['data'] = $dbrs->fields[4];
-      $data['id3']['id3v2']['COMM'][0]['data'] = $dbrs->fields[6];
-      $data['id3']['id3v2']['COMM'][0]['language'] = $lang;
-	  	$data['id3']['id3v2']['COMM'][0]['description'] = "Netjuke Comment";
-      $data['id3']['id3v2']['USLT'][0]['data'] = $dbrs->fields[7];				
-      $data['id3']['id3v2']['USLT'][0]['language'] = $lang;
-      $data['id3']['id3v2']['USLT'][0]['description'] = "Netjuke Lyrics";
+      $data['id3v2']['TIT2']['data'] = $dbrs->fields[0];
+		  $data['id3v2']['TPE1']['data'] = $dbrs->fields[1];
+      $data['id3v2']['TALB']['data'] = $dbrs->fields[2];
+      $data['id3v2']['TRCK']['data'] = $dbrs->fields[3];
+      $data['id3v2']['TIT1']['data'] = $dbrs->fields[4];
+      $data['id3v2']['COMM'][0]['data'] = $dbrs->fields[6];
+      $data['id3v2']['COMM'][0]['language'] = $lang;
+	  	$data['id3v2']['COMM'][0]['description'] = "Netjuke Comment";
+      $data['id3v2']['USLT'][0]['data'] = $dbrs->fields[7];				
+      $data['id3v2']['USLT'][0]['language'] = $lang;
+      $data['id3v2']['USLT'][0]['description'] = "Netjuke Lyrics";
 
       $location = rawurldecode ($dbrs->fields[8]);
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+dU4ErGgMpZIoLA8RApEMAKCTSLW80W5c2tjSNb+YbaAlWeDSkgCgzBPD
TEmvOqbNqbnXNDfWBD0BCSY=
=QMX8
-----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.