Esempio n. 1
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('gmaps_api_key')) {
         return false;
     }
     Preference::insert('gmaps_api_key', 'GoogleMaps api key', '', '75', 'string', 'plugins', $this->name);
     return true;
 }
Esempio n. 2
0
 /**
  * install
  * This function installs the upnp localplay controller
  */
 public function install()
 {
     $sql = "CREATE TABLE `localplay_upnp` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " . "`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " . "`owner` INT( 11 ) NOT NULL, " . "`url` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL  " . ") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
     $db_results = Dba::query($sql);
     // Add an internal preference for the users current active instance
     Preference::insert('upnp_active', 'UPnP Active Instance', '0', '25', 'integer', 'internal', 'upnp');
     return true;
 }
Esempio n. 3
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('flickr_api_key')) {
         return false;
     }
     Preference::insert('flickr_api_key', 'Flickr api key', '', '25', 'string', 'plugins');
     return true;
 }
Esempio n. 4
0
 /**
  * upgrade
  * This is a recommended plugin function
  */
 public function upgrade()
 {
     $from_version = Plugin::get_plugin_version($this->name);
     if ($from_version < 2) {
         Preference::insert('catalogfav_columns', 'Catalog favorites columns', '1', '25', 'integer', 'plugins');
     }
     return true;
 }
Esempio n. 5
0
 /**
  * install
  * This function installs the VLC localplay controller
  */
 public function install()
 {
     $sql = "CREATE TABLE `localplay_vlc` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " . "`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " . "`owner` INT( 11 ) NOT NULL, " . "`host` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " . "`port` INT( 11 ) UNSIGNED NOT NULL , " . "`password` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " . "`access` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '0'" . ") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
     $db_results = Dba::query($sql);
     // Add an internal preference for the users current active instance
     Preference::insert('vlc_active', 'VLC Active Instance', '0', '25', 'integer', 'internal');
     return true;
 }
Esempio n. 6
0
 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('tmdb_api_key')) {
         return false;
     }
     Preference::insert('tmdb_api_key', 'Tmdb api key', '', '75', 'string', 'plugins');
     return true;
 }
Esempio n. 7
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('flattr_user_id')) {
         return false;
     }
     Preference::insert('flattr_user_id', 'Flattr User ID', '', 25, 'string', 'plugins');
     return true;
 }
Esempio n. 8
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('ftl_max_items')) {
         return false;
     }
     Preference::insert('ftl_max_items', 'Friends timeline max items', '5', '25', 'integer', 'plugins', $this->name);
     return true;
 }
Esempio n. 9
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('googleanalytics_tracking_id')) {
         return false;
     }
     Preference::insert('googleanalytics_tracking_id', 'Google Analytics Tracking ID', '', 100, 'string', 'plugins', $this->name);
     return true;
 }
Esempio n. 10
0
 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('discogs_api_key')) {
         return false;
     }
     Preference::insert('discogs_api_key', 'Discogs consumer key', '', '75', 'string', 'plugins', $this->name);
     Preference::insert('discogs_secret_api_key', 'Discogs secret', '', '75', 'string', 'plugins', $this->name);
     return true;
 }
Esempio n. 11
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('stream_control_hits_max')) {
         return false;
     }
     Preference::insert('stream_control_hits_max', 'Stream control maximal hits', '-1', '50', 'integer', 'plugins');
     Preference::insert('stream_control_hits_days', 'Stream control hits history (days)', '30', '50', 'integer', 'plugins');
     return true;
 }
Esempio n. 12
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('stream_control_bandwidth_max')) {
         return false;
     }
     Preference::insert('stream_control_bandwidth_max', 'Stream control maximal bandwidth (Mo)', '1024', '50', 'integer', 'plugins', $this->name);
     Preference::insert('stream_control_bandwidth_days', 'Stream control bandwidth history (days)', '30', '50', 'integer', 'plugins', $this->name);
     return true;
 }
Esempio n. 13
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('shouthome_max_items')) {
         return false;
     }
     Preference::insert('shouthome_max_items', 'Shoutbox on homepage max items', '5', '25', 'integer', 'plugins', $this->name);
     return true;
 }
Esempio n. 14
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('stream_control_time_max')) {
         return false;
     }
     Preference::insert('stream_control_time_max', 'Stream control maximal time (Minutes)', '-1', '50', 'integer', 'plugins', $this->name);
     Preference::insert('stream_control_time_days', 'Stream control time history (days)', '30', '50', 'integer', 'plugins', $this->name);
     return true;
 }
Esempio n. 15
0
 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('tadb_api_key')) {
         return false;
     }
     // API Key requested in TheAudioDB forum, see http://www.theaudiodb.com/forum/viewtopic.php?f=6&t=8&start=140
     Preference::insert('tadb_api_key', 'TheAudioDb api key', '41214789306c4690752dfb', '75', 'string', 'plugins');
     return true;
 }
Esempio n. 16
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('7digital_api_key')) {
         return false;
     }
     Preference::insert('7digital_api_key', '7digital consumer key', '', '75', 'string', 'plugins');
     Preference::insert('7digital_secret_api_key', '7digital secret', '', '75', 'string', 'plugins');
     return true;
 }
Esempio n. 17
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed (they've just hit refresh, those dorks)
     if (Preference::exists('headphones_api_url')) {
         return false;
     }
     Preference::insert('headphones_api_url', 'Headphones url', '', '25', 'string', 'plugins');
     Preference::insert('headphones_api_key', 'Headphones api key', '', '25', 'string', 'plugins');
     return true;
 }
Esempio n. 18
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed (they've just hit refresh, those dorks)
     if (Preference::exists('bitly_username')) {
         return false;
     }
     Preference::insert('bitly_username', 'Bit.ly username', '', '75', 'string', 'plugins');
     Preference::insert('bitly_api_key', 'Bit.ly api key', '', '75', 'string', 'plugins');
     return true;
 }
Esempio n. 19
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('piwik_site_id')) {
         return false;
     }
     Preference::insert('piwik_site_id', 'Piwik Site ID', '1', 100, 'string', 'plugins', 'piwik');
     Preference::insert('piwik_url', 'Piwik URL', AmpConfig::get('web_path') . '/piwik/', 100, 'string', 'plugins', $this->name);
     return true;
 }
Esempio n. 20
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('rssview_feed_url')) {
         return false;
     }
     Preference::insert('rssview_feed_url', 'RSS Feed url', '', '25', 'string', 'plugins');
     Preference::insert('rssview_max_items', 'RSS Feed max items', '5', '25', 'integer', 'plugins');
     return true;
 }
Esempio n. 21
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('paypal_business')) {
         return false;
     }
     Preference::insert('paypal_business', 'Paypal ID', '', 25, 'string', 'plugins', $this->name);
     Preference::insert('paypal_currency_code', 'Paypal Currency Code', 'USD', 25, 'string', 'plugins', $this->name);
     return true;
 }
Esempio n. 22
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('growl_address')) {
         return false;
     }
     Preference::insert('growl_address', 'Growl server address', '127.0.0.1', '25', 'string', 'plugins');
     Preference::insert('growl_pass', 'Growl password', '', '25', 'string', 'plugins');
     Preference::insert('growl_message', 'Growl notification message', '%user now listening %artist - %title', '25', 'string', 'plugins');
     Preference::insert('growl_registered_address', 'Growl registered address', '', '25', 'string', 'internal');
     return true;
 }
Esempio n. 23
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed (they've just hit refresh, those dorks)
     if (Preference::exists('yourls_domain')) {
         return false;
     }
     Preference::insert('yourls_domain', 'YOURLS domain name', '', '25', 'string', 'plugins');
     Preference::insert('yourls_use_idn', 'YOURLS use IDN', '0', '25', 'boolean', 'plugins');
     Preference::insert('yourls_api', 'YOURLS api key', '', '25', 'string', 'plugins');
     return true;
 }
Esempio n. 24
0
function google_maps_call_after_install()
{
    $fields = array();
    $fields["s_section"] = 'plugin-google_maps';
    $fields["s_name"] = 'google_maps_key';
    $fields["s_value"] = '';
    $fields["e_type"] = 'STRING';
    $dao_preference = new Preference();
    $dao_preference->insert($fields);
    unset($dao_preference);
}
Esempio n. 25
0
 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('amazon_base_url')) {
         return false;
     }
     Preference::insert('amazon_base_url', 'Amazon base url', 'http://webservices.amazon.com', '75', 'string', 'plugins');
     Preference::insert('amazon_max_results_pages', 'Amazon max results pages', '1', '75', 'integer', 'plugins');
     Preference::insert('amazon_developer_public_key', 'Amazon Access Key ID', '', '75', 'string', 'plugins');
     Preference::insert('amazon_developer_private_api_key', 'Amazon Secret Access Key', '', '75', 'string', 'plugins');
     Preference::insert('amazon_developer_associate_tag', 'Amazon associate tag', '', '75', 'string', 'plugins');
     return true;
 }
Esempio n. 26
0
 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed (they've just hit refresh, those dorks)
     if (Preference::exists('librefm_user')) {
         return false;
     }
     Preference::insert('librefm_user', 'Libre.FM Username', '', '25', 'string', 'plugins');
     Preference::insert('librefm_md5_pass', 'Libre.FM Password', '', '25', 'string', 'plugins');
     Preference::insert('librefm_port', 'Libre.FM Submit Port', '', '25', 'string', 'internal');
     Preference::insert('librefm_host', 'Libre.FM Submit Host', '', '25', 'string', 'internal');
     Preference::insert('librefm_url', 'Libre.FM Submit URL', '', '25', 'string', 'internal');
     Preference::insert('librefm_challenge', 'Libre.FM Submit Challenge', '', '25', 'string', 'internal');
     return true;
 }
Esempio n. 27
0
function init_db()
{
    if (!Preference::exists('myplex_username')) {
        Preference::insert('myplex_username', 'myPlex Username', '', '25', 'string', 'internal');
        Preference::insert('myplex_authtoken', 'myPlex Auth Token', '', '25', 'string', 'internal');
        Preference::insert('myplex_published', 'Plex Server is published to myPlex', '0', '25', 'boolean', 'internal');
        Preference::insert('plex_uniqid', 'Plex Server Unique Id', uniqid(), '25', 'string', 'internal');
        Preference::insert('plex_servername', 'Plex Server Name', 'Ampache', '25', 'string', 'internal');
        Preference::insert('plex_public_address', 'Plex Public Address', '', '25', 'string', 'internal');
        Preference::insert('plex_public_port', 'Plex Public Port', '32400', '25', 'string', 'internal');
        Preference::insert('plex_local_auth', 'myPlex authentication required on local network', '0', '25', 'boolean', 'internal');
        Preference::insert('plex_match_email', 'Link myPlex users to Ampache based on e-mail address', '1', '25', 'boolean', 'internal');
        User::rebuild_all_preferences();
    }
}
Esempio n. 28
0
 /**
  * upgrade
  * This is a recommended plugin function
  */
 public function upgrade()
 {
     $from_version = Plugin::get_plugin_version($this->name);
     if ($from_version < 4) {
         Preference::rename('lastfm_pass', 'lastfm_md5_pass');
     }
     if ($from_version < 5) {
         Preference::delete('lastfm_md5_pass');
         Preference::delete('lastfm_user');
         Preference::delete('lastfm_url');
         Preference::delete('lastfm_host');
         Preference::delete('lastfm_port');
         Preference::insert('lastfm_grant_link', 'Last.FM Grant URL', '', '25', 'string', 'plugins');
     }
     return true;
 }
Esempio n. 29
0
 /**
  * update_360032
  *
  * Add check update automatically option
  */
 public static function update_360032()
 {
     $retval = true;
     $sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`) " . "VALUES ('autoupdate','1','Check for Ampache updates automatically',25,'boolean','system')";
     $retval &= Dba::write($sql);
     $id = Dba::insert_id();
     $sql = "INSERT INTO `user_preference` VALUES (-1,?,'1')";
     $retval &= Dba::write($sql, array($id));
     Preference::insert('autoupdate_lastcheck', 'AutoUpdate last check time', '', '25', 'string', 'internal');
     Preference::insert('autoupdate_lastversion', 'AutoUpdate last version from last check', '', '25', 'string', 'internal');
     Preference::insert('autoupdate_lastversion_new', 'AutoUpdate last version from last check is newer', '', '25', 'boolean', 'internal');
     return $retval;
 }
Esempio n. 30
0
 /**
  * install
  * This function installs the MPD localplay controller
  */
 public function install()
 {
     /* We need to create the MPD table */
     $sql = "CREATE TABLE `localplay_mpd` ( `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " . "`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " . "`owner` INT( 11 ) NOT NULL , " . "`host` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " . "`port` INT( 11 ) UNSIGNED NOT NULL DEFAULT '6600', " . "`password` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " . "`access` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '0'" . ") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
     $db_results = Dba::write($sql);
     // Add an internal preference for the users current active instance
     Preference::insert('mpd_active', 'MPD Active Instance', '0', '25', 'integer', 'internal');
     User::rebuild_all_preferences();
     return true;
 }