Random issues with Comments Tag?

The place for "I can't figure out how to..." questions.
Post Reply
cayennecode
User
Posts: 1
Joined: Thu Jul 17, 2008 12:54 am

Random issues with Comments Tag?

Post by cayennecode » Thu Jul 17, 2008 12:58 am

Occassionally I run into an mp3 that for some reason will not read the Comments tag when written with iTunes, but will if written with another ID3 editor. So far about 1 in 50 have had this odd problem. If I use another PHP Id3 reader, it will be able to read the COMM tag, even when getID3 fails.

Has anyone noticed any oddness with Comments Tags, iTunes, and getID3?

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Random issues with Comments Tag?

Post by James Heinrich » Thu Jul 17, 2008 1:43 am

Please provide a link to a sample MP3 file that has this problem (PM me to keep it private, or email to info@getid3.org if it's small, ie < 1MB)

kvbbro
User
Posts: 2
Joined: Tue Nov 11, 2008 3:30 pm

Re: Random issues with Comments Tag?

Post by kvbbro » Tue Nov 11, 2008 3:50 pm

I'm also having problems with some of my mp3 files reading the Comments Tag. These were encoded by iTunes v7.6.2.9.
I've tried getID3-1.7.8b1/b2/b3 versions with the same result. Let me know if you want a link to a file.

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Random issues with Comments Tag?

Post by James Heinrich » Fri Nov 14, 2008 1:14 pm

Yes, please submit a link to any files that you think getID3 mishandles.

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Random issues with Comments Tag?

Post by James Heinrich » Fri Dec 19, 2008 12:38 am

kvbbro wrote:All the MP3 files i have with the Comments tag problem are around 20MB. I'll try to find a place to put one of the MP3 somewhere where you can access it if you need it. However, here is a fix/hack that i made to getid3.php that worked around this problem. I compared files with the problem and found that it was related to all version 2 which wrote the Comments tag to the first array element instead of the last. It seemed to work for me but not sure if it was handled the best way or not...

Code: Select all

    1030,1031c1030,1047
    <    foreach ($valuearray as $key => $value) {
    <        if (strlen(trim($value)) > 0) {
    ---
    >
    >   foreach ($valuearray as $key => $value) {
    >                   
    >   //Kenneth 2008Nov12 -- START
    >   // - work around problem with id3v2 major version 2 (iTunes) writing
    >   //the comment to the first element in the array instead of last.
    >   //comment_name == 'id3v2'
    >                   
    >   if ($tag_key == 'comments' && $comment_name == 'id3v2' && $this->info[$comment_name]['majorversion'] == '2') {
    >                                            
    >
    >       if (strlen(trim($value)) > 0 ) {
    >         $this->info['tags'][trim($tag_name)][trim($tag_key)][] = $value; // do not trim!! Unicode characters will get mangled if trailing nulls are removed!
    >          break;
    >       }
    >
    >       //END Kenneth 2008Nov12
    >    } else if (strlen(trim($value)) > 0) {

Post Reply