Structure
Structure
Note that what is described below is only a rough guide to what data
is actually returned by getID3(), since the actual data returned
depends entirely on what data is in your file, what type of file it
is, what kind of data is in the tags, etc. In addition, some formats
(Quicktime for example) use a freeform recursive structure that is
impossible to document completely.
In the vast majority of cases, all the data you'll need is located
in the root of the array or the special arrays described below in
Section 1 (['audio'], ['video'], ['tags_html'], ['replay_gain']).
It is suggested that for most applications you should use tag data
from the root ['tags_html'] array, as this is the only location
where data is stored in a consistant format: HTML-compatible
character entities (ie Ӓ) for characters outside the 0x20-0x7F
range (printable ISO-8859-1 characters). This data can be used as-is
for output in HTML, and can be converted to whatever character set
you wish to use if the output is not HTML.
If you want to merge all available tags (for example, ID3v2 + ID3v1)
into one array, you can call
getid3_lib::CopyTagsToComments($ThisFileInfo)
and you'll then have ['comments'] and ['comments_html'] which are
identical to ['tags'] and ['tags_html'] except the array is one
dimension shorter (no tag type array keys). For example, artist is:
['tags_html']['id3v1']['artist'][0] or ['comments_html']['artist'][0]
/////////////////////////////////////////////////////////////////
array() {
// SECTION 1: Values that are present for
most or all file types
['id3v1']=>array() { // ID3v1
['album']=>string() //
['artist']=>string() //
['comment']=>string() //
['genre']=>string() //
['genreid']=>integer() //
['title']=>string() //
['track']=>integer() //
['year']=>string() //
['padding_valid']=>boolean() //
['comments']=>array() //
['tag_offset_start']=>integer() //
['tag_offset_end']=>integer() //
} //