1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

Fix scrobbler thread autoloader and global variables

This commit is contained in:
Afterster 2014-01-11 12:34:40 +01:00
parent 5cdcf4b12f
commit 41f5d0b7fd
13 changed files with 42 additions and 39 deletions

View file

@ -60,7 +60,7 @@ class Ampachechartlyrics {
* This is a required plugin function; here it populates the prefs we
* need for this object.
*/
public function load() {
public function load($user) {
return true;
} // load

View file

@ -138,10 +138,10 @@ class AmpacheHeadphones {
* This loads up the data we need into this object, this stuff comes
* from the preferences.
*/
public function load() {
public function load($user) {
$GLOBALS['user']->set_preferences();
$data = $GLOBALS['user']->prefs;
$user->set_preferences();
$data = $user->prefs;
if (strlen(trim($data['headphones_api_url']))) {
$this->api_url = trim($data['headphones_api_url']);

View file

@ -192,10 +192,10 @@ class AmpacheLastfm {
* This loads up the data we need into this object, this stuff comes
* from the preferences.
*/
public function load() {
public function load($user) {
$GLOBALS['user']->set_preferences();
$data = $GLOBALS['user']->prefs;
$user->set_preferences();
$data = $user->prefs;
if (strlen(trim($data['lastfm_user']))) {
$this->username = trim($data['lastfm_user']);
@ -212,7 +212,7 @@ class AmpacheLastfm {
return false;
}
$this->user_id = $GLOBALS['user']->id;
$this->user_id = $user->id;
// If we don't have the other stuff try to get it before giving up
if (!$data['lastfm_host'] || !$data['lastfm_port'] || !$data['lastfm_url'] || !$data['lastfm_challenge']) {

View file

@ -191,10 +191,10 @@ class Ampachelibrefm {
* This loads up the data we need into this object, this stuff comes
* from the preferences.
*/
public function load() {
public function load($user) {
$GLOBALS['user']->set_preferences();
$data = $GLOBALS['user']->prefs;
$user->set_preferences();
$data = $user->prefs;
if (strlen(trim($data['librefm_user']))) {
$this->username = trim($data['librefm_user']);
@ -211,7 +211,7 @@ class Ampachelibrefm {
return false;
}
$this->user_id = $GLOBALS['user']->id;
$this->user_id = $user->id;
// If we don't have the other stuff try to get it before giving up
if (!$data['librefm_host'] || !$data['librefm_port'] || !$data['librefm_url'] || !$data['librefm_challenge']) {

View file

@ -60,7 +60,7 @@ class Ampachelyricwiki {
* This is a required plugin function; here it populates the prefs we
* need for this object.
*/
public function load() {
public function load($user) {
return true;
} // load

View file

@ -57,7 +57,7 @@ class AmpacheMusicBrainz {
* This is a required plugin function; here it populates the prefs we
* need for this object.
*/
public function load() {
public function load($user) {
return true;
} // load