Page 1 of 1

Getting genre name of id3v1

Posted: Wed Aug 16, 2006 10:19 am
by appeland
Hello,
I am trying to get the genre name of the id3v1 tags, but I keep getting the ID back :?: .
Would anyone know how to do this properly ?
Currently trying:
@$ThisFileInfo['tags']['id3v1']['genre'][0];

(using the basic demo)

Thanks and Regards,
Andi

Posted: Wed Aug 16, 2006 11:31 am
by James Heinrich
If you're specifically looking for the text genre of the ID3v1 tag, it would be in

Code: Select all

@$ThisFileInfo['id3v1']['genre'];
If you run demo.browse.php you can explore the whole returned structure and figure out where best to pull the values from for your needs.

id3v2 genre has int value after upgrade to 1.7.7 from 1.7.5

Posted: Thu Oct 19, 2006 5:24 am
by vollmerk
I just upgraded from 1.7.5 --> 1.7.7 and I noticed that a vast majority of my audio files now return a int value for their genre or a combination of int + human readable name. I've linked a full var output from the getid3() results the id3v1 tag looks ok, however the v2 tag includes a (17) in front of the 'Rock' genre. Currently I 'hack' the (\d) out of the front of the genre however this doesn't help with files that _only_ list the int genre value.

Am I doing something wrong?

Full Output

-Karl Vollmer
Ampache Lead Developer

Re: id3v2 genre has int value after upgrade to 1.7.7 from 1.

Posted: Thu Oct 19, 2006 10:52 am
by Allan Hansen
vollmerk wrote:I just upgraded from 1.7.5 --> 1.7.7 and I noticed that a vast majority of my audio files now return a int value for their genre or a combination of int + human readable name. I've linked a full var output from the getid3() results the id3v1 tag looks ok, however the v2 tag includes a (17) in front of the 'Rock' genre. Currently I 'hack' the (\d) out of the front of the genre however this doesn't help with files that _only_ list the int genre value.

Am I doing something wrong?
Can you host or email a sample file? ah at artemis dot dk

Posted: Thu Oct 19, 2006 11:00 pm
by vollmerk
E-mail sent, hopefully you got it :) it was a rather large one. :)

Posted: Fri Oct 20, 2006 9:51 am
by Allan Hansen
vollmerk wrote:E-mail sent, hopefully you got it :) it was a rather large one. :)
Received.

Problem occurs in getID3() 1.7.7, not in 2.0.0b3.
Looking into a fix now.

Posted: Fri Oct 20, 2006 10:00 am
by Allan Hansen
Allan Hansen wrote:Looking into a fix now.
This is actually a major bug.

bugfix:

module.tag.id3v2.php

line 2935 and line 2937

replace content_type with genre, so the lines look like:

TCO genre
TCON genre

Posted: Sat Oct 21, 2006 9:55 pm
by vollmerk
Thanks for the patch, it worked perfectly :) keep up the good work