1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

in theory a patch that allows getid3() to continue working even with some iconv() issues

This commit is contained in:
Karl 'vollmerk' Vollmer 2006-10-19 05:27:39 +00:00
parent d45a743f64
commit b3634df51a
2 changed files with 12 additions and 3 deletions

View file

@ -953,6 +953,7 @@ class getid3_lib
if ($in_charset == $out_charset) { if ($in_charset == $out_charset) {
return $string; return $string;
} }
if (!in_charset) { return $string; }
static $iconv_broken_or_unavailable = array(); static $iconv_broken_or_unavailable = array();
if (is_null(@$iconv_broken_or_unavailable[$in_charset.'_'.$out_charset])) { if (is_null(@$iconv_broken_or_unavailable[$in_charset.'_'.$out_charset])) {

View file

@ -68,6 +68,7 @@ class vainfo {
$this->_getID3->option_md5_data_source = false; $this->_getID3->option_md5_data_source = false;
$this->_getID3->option_tags_html = false; $this->_getID3->option_tags_html = false;
$this->_getID3->option_extra_info = false; $this->_getID3->option_extra_info = false;
$this->_getID3->option_tag_lyrics3 = false;
$this->_getID3->encoding = $this->encoding; $this->_getID3->encoding = $this->encoding;
/* Check for ICONV */ /* Check for ICONV */
@ -191,8 +192,8 @@ class vainfo {
case 'id3v2': case 'id3v2':
$results[$key] = $this->_parse_id3v2($tag_array); $results[$key] = $this->_parse_id3v2($tag_array);
break; break;
// case 'ape': case 'ape':
// $results[$key] = $this->_parse_ape($tag_array); $results[$key] = $this->_parse_ape($tag_array);
break; break;
case 'quicktime': case 'quicktime':
$results[$key] = $this->_parse_quicktime($tag_array); $results[$key] = $this->_parse_quicktime($tag_array);
@ -383,6 +384,13 @@ class vainfo {
*/ */
function _parse_ape($tags) { function _parse_ape($tags) {
foreach ($tags as $tag=>$data) {
$array[$tag] = $this->_clean_tag($data['0'],$this->_file_encoding);
} // end foreach tags
return $array;
} // _parse_ape } // _parse_ape