diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-17 06:30:36 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-11-17 06:30:36 +0000 |
commit | c522a2c1e97518d21e351821c27a9188e0cb3a1d (patch) | |
tree | a4a2ece3b050d4624ea9737a20bb9d2e0bf9dfb8 /bin | |
parent | 4fb9dbd3ef5b0b613efb32c5e02ca64db37d336a (diff) | |
download | ampache-c522a2c1e97518d21e351821c27a9188e0cb3a1d.tar.gz ampache-c522a2c1e97518d21e351821c27a9188e0cb3a1d.tar.bz2 ampache-c522a2c1e97518d21e351821c27a9188e0cb3a1d.zip |
some bug fixes and tweaks
Diffstat (limited to 'bin')
-rw-r--r-- | bin/print_tags.php.inc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/print_tags.php.inc b/bin/print_tags.php.inc index 9ef62f18..f6c03195 100644 --- a/bin/print_tags.php.inc +++ b/bin/print_tags.php.inc @@ -22,18 +22,22 @@ $no_session = '1'; require ("../lib/init.php"); -/** - * Set this to true if you want it to e-mail a report - * to tags@ampache.org (usefull for troubleshooting - */ -//$send_mail = true; - if (count($GLOBALS['argv']) == '1') { $filename = usage(); } -else { $filename = $GLOBALS['argv']['1']; } +else { + $filename = $GLOBALS['argv']['1']; + $send_mail = $GLOBALS['argv']['2']; +} echo "Reading: $filename\n"; -$info = new vainfo($filename); +/* Attempt to figure out what catalog it comes from */ +$sql = "SELECT catalog.id FROM song LEFT JOIN catalog ON song.catalog=catalog.id WHERE song.file='" . sql_escape($filename) . "'"; +$db_results = mysql_query($sql,dbh()); +$results = mysql_fetch_assoc($db_results); + +$catalog = new Catalog($results['id']); + +$info = new vainfo($filename,'',$catalog->sort_pattern,$catalog->rename_pattern); $info->get_info(); $results = $info->tags; $results['file'] = $filename; |