diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-14 07:33:26 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-14 07:33:26 +0000 |
commit | ac8056bad9b8e55ba2296c28a96968d33dfbd003 (patch) | |
tree | ca18ce4e5259c70596dcefd9d2b8b6c0ebdd9e29 /bin | |
parent | 641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7 (diff) | |
download | ampache-ac8056bad9b8e55ba2296c28a96968d33dfbd003.tar.gz ampache-ac8056bad9b8e55ba2296c28a96968d33dfbd003.tar.bz2 ampache-ac8056bad9b8e55ba2296c28a96968d33dfbd003.zip |
removed some dead scripts, moved stuff around, fiddled with albums page... might be an issue with the catalog add... or I might have just discovered a _ton_ of crappy tags... or a bug in getid3() figuring out which it is, is something for tomorrow
Diffstat (limited to 'bin')
-rw-r--r-- | bin/catalog_update.inc (renamed from bin/catalog_update.php.inc) | 5 | ||||
-rw-r--r-- | bin/compare_config.php.inc | 55 | ||||
-rw-r--r-- | bin/delete_disabled.inc (renamed from bin/delete_disabled.php.inc) | 4 | ||||
-rw-r--r-- | bin/dump_album_art.inc (renamed from bin/dump_album_art.php.inc) | 4 | ||||
-rw-r--r-- | bin/parse_m3u.php.inc | 47 | ||||
-rwxr-xr-x | bin/print_amazon.php.inc | 42 | ||||
-rw-r--r-- | bin/print_tags.inc (renamed from bin/print_tags.php.inc) | 12 | ||||
-rw-r--r-- | bin/sort_files.inc (renamed from bin/sort_files.php.inc) | 4 | ||||
-rw-r--r-- | bin/write_playlists.inc (renamed from bin/write_playlists.php.inc) | 0 | ||||
-rw-r--r-- | bin/write_tags.inc (renamed from bin/write_tags.php.inc) | 4 |
10 files changed, 23 insertions, 154 deletions
diff --git a/bin/catalog_update.php.inc b/bin/catalog_update.inc index 0c4a03ec..342912ff 100644 --- a/bin/catalog_update.php.inc +++ b/bin/catalog_update.inc @@ -21,7 +21,10 @@ */ define('NO_SESSION','1'); -require ('../lib/init.php'); +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once $prefix . '/lib/init.php'; + echo "[catalog_update.php.inc]\nStarting Catalog Clean/Update And Add\n\n"; diff --git a/bin/compare_config.php.inc b/bin/compare_config.php.inc deleted file mode 100644 index 04c92540..00000000 --- a/bin/compare_config.php.inc +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/* - - Copyright (c) 2001 - 2006 Ampache.org - All rights reserved - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -define('NO_SESSION','1'); -require ('../lib/init.php'); -require ('../lib/debug.lib.php'); - -$results = debug_read_config(conf('prefix') . "/config/ampache.cfg.php"); - -$dist_results = debug_read_config(conf('prefix') . "/config/ampache.cfg.php.dist"); - -echo "\nCHECKING CONF VARS... \n\n"; - -foreach ($dist_results['conf'] as $key=>$value) { - - if (!isset($results['conf'][$key])) { - echo "MISSING:"; - echo " $key = $value\n"; - } - -} // foreach dist - -echo "\nCHECKING LIBGLUE VARS...\n\n"; - -foreach ($dist_results['libglue'] as $key=>$value) { - - if (!isset($results['libglue'][$key])) { - echo "MISSING:"; - echo " $key = $value\n"; - } - - -} // foreach libglue - -?> - diff --git a/bin/delete_disabled.php.inc b/bin/delete_disabled.inc index 769a5506..bec402ea 100644 --- a/bin/delete_disabled.php.inc +++ b/bin/delete_disabled.inc @@ -30,7 +30,9 @@ $debug = true; define('NO_SESSION','1'); -require ("../lib/init.php"); +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once $prefix . '/lib/init.php'; /* Get a list of filenames */ $sql = "SELECT id,file FROM song WHERE enabled='0'"; diff --git a/bin/dump_album_art.php.inc b/bin/dump_album_art.inc index 75ddea61..4baa0ebf 100644 --- a/bin/dump_album_art.php.inc +++ b/bin/dump_album_art.inc @@ -20,7 +20,9 @@ */ define('NO_SESSION','1'); -require ("../lib/init.php"); +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once $prefix . '/lib/init.php'; $catalogs = Catalog::get_catalogs(); diff --git a/bin/parse_m3u.php.inc b/bin/parse_m3u.php.inc deleted file mode 100644 index c7cafa87..00000000 --- a/bin/parse_m3u.php.inc +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/* - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - - -/* Name of the filename who's tags you want to read */ -$filename = "/data/music/Live/L/Life'll Kill Ya/Warren Zevon.m3u"; - - -define('NO_SESSION','1'); -require ("../lib/init.php"); - -$handle = fopen($filename,'r'); - -$data = fread($handle,filesize($filename)); - -$results = explode("\n",$data); - -foreach ($results as $value) { - $value = trim($value); - if (preg_match("/\.[A-Za-z0-9]{3}$/",$value)) { - echo "$value \n"; - $sql = "SELECT id FROM song WHERE file LIKE '%" . sql_escape($value) . "'"; - $db_results = mysql_query($sql, dbh()); - $foo = mysql_result($db_results,'id'); - echo "\t Results: " . $foo . "\n"; - print_r($foo); - } - -} // end foreach - -?> diff --git a/bin/print_amazon.php.inc b/bin/print_amazon.php.inc deleted file mode 100755 index d2bee2a9..00000000 --- a/bin/print_amazon.php.inc +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/* - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - - -/* Name of the filename who's tags you want to read */ -$search['album_name'] = "Ariels"; -$search['artist_name'] = "Bent"; - - - -define('NO_SESSION','1'); -require ("../lib/init.php"); -echo "<pre>\n"; -$amazon = new AmazonSearch(conf('amazon_developer_key')); -// Prevent the script from timing out -set_time_limit(0); -$search_term = $search['artist_name'] . " " . $search['album_name']; -$amazon->search(array('artist' => $search['artist_name'], 'album' => $search['album_name'], 'keywords' => $serch_term)); -$amazon->lookup($amazon->results); - -echo "Search Term: $search_term\n"; -echo "Artist: " . $search['artist_name'] . " AND Album: " . $search['album_name'] . "\n"; -print_r($amazon->results); -echo "\n</pre>"; -?> - diff --git a/bin/print_tags.php.inc b/bin/print_tags.inc index 5637d19d..407bbce9 100644 --- a/bin/print_tags.php.inc +++ b/bin/print_tags.inc @@ -1,7 +1,7 @@ <?php /* - Copyright 2001 - 2006 Ampache.org + Copyright 2001 - 2007 Ampache.org All Rights Reserved This program is free software; you can redistribute it and/or @@ -21,7 +21,9 @@ */ define('NO_SESSION','1'); -require ("../lib/init.php"); +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once $prefix . '/lib/init.php'; if (count($GLOBALS['argv']) == '1') { $filename = usage(); } else { @@ -32,9 +34,9 @@ else { echo "Reading: $filename\n"; /* 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); +$sql = "SELECT `catalog`.`id` FROM `song` INNER JOIN `catalog` ON `song`.`catalog`=`catalog`.`id` WHERE `song`.`file`='" . Dba::escape($filename) . "'"; +$db_results = Dba::query($sql); +$results = Dba::fetch_assoc($db_results); $catalog = new Catalog($results['id']); diff --git a/bin/sort_files.php.inc b/bin/sort_files.inc index 7126af45..ea3b4807 100644 --- a/bin/sort_files.php.inc +++ b/bin/sort_files.inc @@ -38,7 +38,9 @@ $alphabet_prefix = true; define('NO_SESSION','1'); -require ("../lib/init.php"); +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once $prefix . '/lib/init.php'; /* First Clean the catalog to we don't try to write anything we shouldn't */ diff --git a/bin/write_playlists.php.inc b/bin/write_playlists.inc index 62c3ed96..62c3ed96 100644 --- a/bin/write_playlists.php.inc +++ b/bin/write_playlists.inc diff --git a/bin/write_tags.php.inc b/bin/write_tags.inc index 5f1445a0..ef5152e5 100644 --- a/bin/write_tags.php.inc +++ b/bin/write_tags.inc @@ -27,7 +27,9 @@ */ define('NO_SESSION','1'); -require ("../lib/init.php"); +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once $prefix . '/lib/init.php'; // Include getID3 libs, including the ability to write tags $getID3 = new getID3(); |