diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-02 07:48:31 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-02 07:48:31 +0000 |
commit | 201cf8600085634666ae748b6bd4ac259115c94a (patch) | |
tree | ac7396fe636521449340dcdfae36c5c5c5011484 /lib/class/album.class.php | |
parent | dad4a95101543eb8576f7fb5a4c2596369e9a9f5 (diff) | |
download | ampache-201cf8600085634666ae748b6bd4ac259115c94a.tar.gz ampache-201cf8600085634666ae748b6bd4ac259115c94a.tar.bz2 ampache-201cf8600085634666ae748b6bd4ac259115c94a.zip |
catalog verify mostly works, need to clean up the album art gather before its completely better
Diffstat (limited to 'lib/class/album.class.php')
-rw-r--r-- | lib/class/album.class.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index be967ded..ec1e819b 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -338,7 +338,7 @@ class Album { $data = array(); /* See if we are looking for a specific filename */ - $preferred_filename = conf('album_art_preferred_filename'); + $preferred_filename = Config::get('album_art_preferred_filename'); // Init a horrible hack array of lameness $cache =array(); @@ -354,11 +354,10 @@ class Album { $handle = @opendir($dir); if (!is_resource($handle)) { - echo "<font class=\"error\">" . _("Error: Unable to open") . " $dir</font><br />\n"; + Error::add('general',_('Error: Unable to open') . ' ' . $dir); debug_event('read',"Error: Unable to open $dir for album art read",'2'); } - /* Recurse through this dir and create the files array */ while ( FALSE !== ($file = @readdir($handle)) ) { $extension = substr($file,strlen($file)-3,4); @@ -397,7 +396,7 @@ class Album { return $data; - } // get_folder_art() + } // get_folder_art /** * get_resized_db_art @@ -462,7 +461,7 @@ class Album { $amazon_base_urls = array(); /* Attempt to retrive the album art order */ - $config_value = conf('amazon_base_urls'); + $config_value = Config::get('amazon_base_urls'); /* If it's not set */ if (empty($config_value)) { @@ -472,18 +471,18 @@ class Album { array_push($amazon_base_urls,$config_value); } else { - $amazon_base_urls = array_merge($amazon_base_urls, conf('amazon_base_urls')); + $amazon_base_urls = array_merge($amazon_base_urls, Config::get('amazon_base_urls')); } /* Foreach through the base urls that we should check */ foreach ($amazon_base_urls AS $amazon_base) { // Create the Search Object - $amazon = new AmazonSearch(conf('amazon_developer_key'), $amazon_base); + $amazon = new AmazonSearch(Config::get('amazon_developer_key'), $amazon_base); $search_results = array(); /* Setup the needed variables */ - $max_pages_to_search = max(conf('max_amazon_results_pages'),$amazon->_default_results_pages); + $max_pages_to_search = max(Config::get('max_amazon_results_pages'),$amazon->_default_results_pages); $pages_to_search = $max_pages_to_search; //init to max until we know better. // while we have pages to search @@ -521,7 +520,7 @@ class Album { } /* Log this if we're doin debug */ - debug_event('amazon-xml',"Searched using $keywords with " . conf('amazon_developer_key') . " as key " . count($final_results) . " results found",'5'); + debug_event('amazon-xml',"Searched using $keywords with " . Config::get('amazon_developer_key') . " as key " . count($final_results) . " results found",'5'); // If we've hit our limit if (!empty($limit) && count($final_results) >= $limit) { |