$commentexploded =
explode('=',
$commentstring, 2
);
$ThisFileInfo_ogg_comments_raw[$i]['key'
] =
strtoupper($commentexploded[0
]);
$ThisFileInfo_ogg_comments_raw[$i]['value'
] =
(isset($commentexploded[1
]) ?
$commentexploded[1
] : ''
);
if ($ThisFileInfo_ogg_comments_raw[$i]['key'
] == 'METADATA_BLOCK_PICTURE'
) { // http://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE
// The unencoded format is that of the FLAC picture block. The fields are stored in big endian order as in FLAC, picture data is stored according to the relevant standard.
// http://flac.sourceforge.net/format.html#metadata_block_picture
$flac =
new getid3_flac($this->getid3
);
$flac->
setStringMode(base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value'
]));
$flac->
parsePICTURE();
$info['ogg'
]['comments'
]['picture'
][] =
$flac->getid3->info
['flac'
]['PICTURE'
][0
];
unset($flac);
} elseif ($ThisFileInfo_ogg_comments_raw[$i]['key'
] == 'COVERART'
) { $data =
base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value'
]);
$this->
notice('Found deprecated COVERART tag, it should be replaced in honor of METADATA_BLOCK_PICTURE structure'
);
/** @todo use 'coverartmime' where available */
$imageinfo = getid3_lib::
GetDataImageSize($data);
if ($imageinfo === false || !
isset($imageinfo['mime'
])) {