content_type?

The place for "I can't figure out how to..." questions.
Post Reply
spl1nter
User
Posts: 4
Joined: Wed Jul 26, 2006 4:45 pm

content_type?

Post by spl1nter » Thu Jul 27, 2006 1:17 pm

In the ID3v2 tag what does:

Code: Select all

[content_type] => Array
(
  [0] => (17)
)
mean? What is content_type?

I took a look at the specification but it doesn't really explain what it's used for:
The 'Content type', which ID3v1 was stored as a one byte numeric value only, is now a string. You may use one or several of the ID3v1 types as numerical strings, or, since the category list would be impossible to maintain with accurate and up to date categories, define your own. Example: "21" $00 "Eurodisco" $00

You may also use any of the following keywords:

RX Remix
CR Cover
I'm guessing it's dependent on whatever program wrote the tag?

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:

Post by James Heinrich » Fri Jul 28, 2006 12:50 am

ID3v2 genres are typically stored as strings for custom genres and as parenthesised integers for the ID3v1-style predefined genres. If you take at the list in module.tag.id3v1.php in function ArrayOfGenres(), you'll see genre #17 is "Rock". getID3() should dereference the integer genres and present you a string version of the genre (eg: "Rock").

spl1nter
User
Posts: 4
Joined: Wed Jul 26, 2006 4:45 pm

Post by spl1nter » Fri Jul 28, 2006 9:45 am

Ah, that would make sense as the ID3v1 Genre was Rock.

Cheers :)

Post Reply