summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-06-19 06:17:30 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-06-19 06:17:30 +0000
commitde957a17befcccbc439bca48c059e51c10b6bb1b (patch)
tree5ff2fd018c52fc228fef7d710681b3bf8ff5448a
parent26cfd58bcc0b64a6ccb7550ce7908bf812fcb87a (diff)
downloadampache-de957a17befcccbc439bca48c059e51c10b6bb1b.tar.gz
ampache-de957a17befcccbc439bca48c059e51c10b6bb1b.tar.bz2
ampache-de957a17befcccbc439bca48c059e51c10b6bb1b.zip
default to id3v2 worst cast on tag gather, replace audioinfo class in /upload
-rw-r--r--lib/upload.php12
-rwxr-xr-xmodules/id3/vainfo.class.php7
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/upload.php b/lib/upload.php
index deac8ffd..9390d519 100644
--- a/lib/upload.php
+++ b/lib/upload.php
@@ -180,19 +180,19 @@ function get_uploads() {
$sql = "SELECT * FROM " . tbl_name('upload');
$db_results = mysql_query($sql, dbh());
- $audio_info = new Audioinfo();
$results = array();
while ($r = mysql_fetch_assoc($db_results)) {
- /* Create the Audioinfo object and get info */
- $data = $audio_info->Info($r['file']);
- $data['file'] = $r['file'];
+ /* Create the vainfo object and get info */
+ $vainfo = new vainfo($r['file']);
+ $vainfo->get_info();
+ $data = $vainfo->tags;
- $key = get_tag_type($data);
+ $key = get_tag_type($vainfo->tags);
/* Fill Empty info from filename/path */
- $data = clean_tag_info($data,$key,$data['file']);
+ $data = clean_tag_info($vainfo->tags,$key,$r['file']);
$data['id'] = $r['id'];
$data['user'] = $r['user'];
diff --git a/modules/id3/vainfo.class.php b/modules/id3/vainfo.class.php
index 5cd6239c..94366c20 100755
--- a/modules/id3/vainfo.class.php
+++ b/modules/id3/vainfo.class.php
@@ -184,11 +184,12 @@ class vainfo {
case 'id3v2':
$results[$key] = $this->_parse_id3v2($tag_array);
break;
- case 'ape':
- $results[$key] = $this->_parse_ape($tag_array);
+// case 'ape':
+// $results[$key] = $this->_parse_ape($tag_array);
break;
default:
- debug_event('vainfo','Error: Unable to determine tag type of ' . $key . ' for file ' . $this->filename,'5');
+ debug_event('vainfo','Error: Unable to determine tag type of ' . $key . ' for file ' . $this->filename . ' Assuming id3v2','5');
+ $results[$key] = $this->_parse_id3v2($tag_array);
break;
} // end switch