diff options
-rw-r--r-- | admin/catalog.php | 11 | ||||
-rwxr-xr-x | docs/CHANGELOG | 4 | ||||
-rwxr-xr-x | docs/MIGRATION | 9 | ||||
-rwxr-xr-x | docs/README | 2 | ||||
-rw-r--r-- | lib/class/localplay.abstract.php | 5 | ||||
-rw-r--r-- | lib/class/localplay.class.php | 14 | ||||
-rw-r--r-- | modules/localplay/httpq.controller.php | 49 | ||||
-rw-r--r-- | modules/localplay/mpd.controller.php | 45 | ||||
-rw-r--r-- | radio.php | 2 | ||||
-rw-r--r-- | server/ajax.server.php | 2 | ||||
-rw-r--r-- | templates/show_catalog_row.inc.php | 1 |
11 files changed, 94 insertions, 50 deletions
diff --git a/admin/catalog.php b/admin/catalog.php index 64097bc0..cef87cde 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -241,9 +241,14 @@ switch ($_REQUEST['action']) { require_once Config::get('prefix') . '/templates/show_edit_catalog.inc.php'; break; case 'gather_album_art': - $catalogs = Catalog::get_catalogs(); - foreach ($catalogs as $catalog) { - $catalog_id = $catalog->id; + ob_end_flush(); + if (!$_REQUEST['catalog_id']) { + $catalogs = Catalog::get_catalogs(); + } + + // Itterate throught the catalogs and gather as needed + foreach ($catalogs as $catalog_id) { + $catalog = new Catalog($catalog_id); require Config::get('prefix') . '/templates/show_gather_art.inc.php'; flush(); $catalog->get_album_art('',1); diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 0927d824..c451fe34 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,10 @@ -------------------------------------------------------------------------- v.3.4-Alpha3 + - Added ability to gather album art for a single catalog at a time + - Improved Upgrade Documentation + - Disabled more functionality when in Demo Mode because people + are lame - Cleaned up Preferences, moved Plugin Preferences into their own section - Fixed potential LastFM issue if invalid data is passed diff --git a/docs/MIGRATION b/docs/MIGRATION index 3b826133..d3dc8e9e 100755 --- a/docs/MIGRATION +++ b/docs/MIGRATION @@ -2,6 +2,15 @@ --------- MIGRATION - Ampache v.3.4 ----------- ------------------------------------------------------------------------------- +-- Upgrading ALL VERSIONS -- + + When upgrading Ampache extract the new .tar.gz into your existing + webpath, and then make sure that the /config/ampache.cfg.php from + your old install is copied into the new directory, then follow any + instructions provided via the web interface. + + Specifics for upgrading between versions are provided below + - Migrating from Ampache 3.3.x --> 3.4 The config file format has changed, please follow the instructions diff --git a/docs/README b/docs/README index 72f70057..6ff5ba05 100755 --- a/docs/README +++ b/docs/README @@ -136,7 +136,7 @@ Contents: If you are upgrading from an older version of Ampache we recommend moving the old directory out of the way, extracting the new copy in - its place and then re-creating the config file. All database updates + its place and then copying the old config file. All database updates will be handled by the /update.php script. There is no need to insert the /sql/ampache.sql if you have an existing installation. diff --git a/lib/class/localplay.abstract.php b/lib/class/localplay.abstract.php index bcf1079a..1874e390 100644 --- a/lib/class/localplay.abstract.php +++ b/lib/class/localplay.abstract.php @@ -34,7 +34,10 @@ abstract class localplay_controller { abstract public function status(); abstract public function get_version(); // Returns the version of this plugin abstract public function get_description(); // Returns the description - abstract public function get_preferences(); // Returns an array of the prefs needed + abstract public function actions(); // Return an array of name=>link actions for the sidebar + abstract public function is_installed(); // Returns an boolean t/f + abstract public function install(); + abstract public function uninstall(); /** * get_url diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index e048dd17..d9d19841 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -227,19 +227,7 @@ class Localplay { // If we can't even load it no sense in going on if (!isset($localplay->_player)) { return false; } - $preferences = $localplay->get_preferences(); - - foreach ($preferences as $preference) { - $name = 'localplay_' . $type . '_' . $preference['name']; - /* Check for existing record */ - $sql = "SELECT `id` FROM `preference` WHERE `name` = '" . Dba::escape($name) . "'"; - $db_results = Dba::query($sql); - - if (!Dba::num_rows($db_results)) { return false; } - - } // end foreach - - return true; + return $localplay->_player->is_installed(); } // is_enabled diff --git a/modules/localplay/httpq.controller.php b/modules/localplay/httpq.controller.php index d1cce1ae..3ceb8c04 100644 --- a/modules/localplay/httpq.controller.php +++ b/modules/localplay/httpq.controller.php @@ -101,29 +101,46 @@ class AmpacheHttpq extends localplay_controller { } // function_map - /** - * preference - * This function returns an array of the preferences and their - * information for Ampache to use All preferences will get a - * localplay_mpd_ appended to their name to avoid conflicts - * however this controller does not need to take that into acount - * REQUIRE for Locaplay - */ - public function get_preferences() { + /** + * is_installed + * This returns true or false if MPD controller is installed + */ + public function is_installed() { + + + } // is_installed + + /** + * install + * This function installs the MPD localplay controller + */ + public function install() { - $preferences = array(); - $preferences[] = array('name'=>'hostname','default'=>'localhost','type'=>'string','description'=>'HttpQ Hostname'); - $preferences[] = array('name'=>'port','default'=>'4800','type'=>'integer','description'=>'HttpQ Port'); - $preferences[] = array('name'=>'password','default'=>'','type'=>'string','description'=>'HttpQ Password'); - return $preferences; + } // install + + /** + * uninstall + * This removes the localplay controller + */ + public function uninstall() { + + + } // uninstall + + /** + * actions + * List all the special kick ass things you can do with MPD + */ + public function actions() { + - } // get_preferences + } // actions /** - * songs + * add * This must take an array of URL's from Ampache * and then add them to HttpQ */ diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index 7925d3e1..8e067960 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -104,28 +104,45 @@ class AmpacheMpd extends localplay_controller { } // function_map /** - * preference - * This function returns an array of the preferences and their - * information for Ampache to use All preferences will get a - * localplay_mpd_ appended to their name to avoid conflicts - * however this controller does not need to take that into acount - * REQUIRE for Locaplay + * is_installed + * This returns true or false if MPD controller is installed */ - public function get_preferences() { + public function is_installed() { - $preferences = array(); - $preferences[] = array('name'=>'hostname','default'=>'localhost','type'=>'string','description'=>'MPD Hostname'); - $preferences[] = array('name'=>'port','default'=>'6600','type'=>'integer','description'=>'MPD Port'); - $preferences[] = array('name'=>'password','default'=>'','type'=>'string','description'=>'MPD Password'); + } // is_installed + + /** + * install + * This function installs the MPD localplay controller + */ + public function install() { + + + + } // install + + /** + * uninstall + * This removes the localplay controller + */ + public function uninstall() { + + + } // uninstall + + /** + * actions + * List all the special kick ass things you can do with MPD + */ + public function actions() { - return $preferences; - } // preferences + } // actions /** - * add_songs + * add * This must take an array of URL's from Ampache * and then add them to MPD */ @@ -35,7 +35,7 @@ switch ($_REQUEST['action']) { break; case 'create': - if (!$GLOBALS['user']->has_access('25')) { + if (!$GLOBALS['user']->has_access('25') || Config::get('demo_mode')) { access_denied(); exit; } diff --git a/server/ajax.server.php b/server/ajax.server.php index 5c3537be..60e45dcf 100644 --- a/server/ajax.server.php +++ b/server/ajax.server.php @@ -125,7 +125,7 @@ switch ($_REQUEST['action']) { } // Make sure we've got them rights - if (!$GLOBALS['user']->has_access($level)) { + if (!$GLOBALS['user']->has_access($level) || Config::get('demo_mode')) { exit; } diff --git a/templates/show_catalog_row.inc.php b/templates/show_catalog_row.inc.php index 186829bb..d58d7e30 100644 --- a/templates/show_catalog_row.inc.php +++ b/templates/show_catalog_row.inc.php @@ -28,4 +28,5 @@ $web_path = Config::get('web_path'); <a href="<?php echo $web_path; ?>/admin/catalog.php?action=add_to_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Add'); ?></a> | <a href="<?php echo $web_path; ?>/admin/catalog.php?action=update_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Verify'); ?></a> | <a href="<?php echo $web_path; ?>/admin/catalog.php?action=clean_catalog&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Clean'); ?></a> + | <a href="<?php echo $web_path; ?>/admin/catalog.php?action=gather_album_art&catalogs[]=<?php echo $catalog->id; ?>"><?php echo _('Gather Art'); ?></a> </td> |