mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 19:41:55 +02:00
arg stupid plugins
This commit is contained in:
parent
caaf0f6e12
commit
fe7a6b75f6
2 changed files with 1 additions and 23 deletions
|
@ -433,6 +433,7 @@ class User {
|
||||||
$song_info = new Song($song_id);
|
$song_info = new Song($song_id);
|
||||||
//FIXME:: User uid reference
|
//FIXME:: User uid reference
|
||||||
$user = $this->uid;
|
$user = $this->uid;
|
||||||
|
|
||||||
if (!$song_info->file) { return false; }
|
if (!$song_info->file) { return false; }
|
||||||
|
|
||||||
$stats = new Stats();
|
$stats = new Stats();
|
||||||
|
@ -441,27 +442,6 @@ class User {
|
||||||
$stats->insert('artist',$song_info->artist,$user);
|
$stats->insert('artist',$song_info->artist,$user);
|
||||||
$stats->insert('genre',$song_info->genre,$user);
|
$stats->insert('genre',$song_info->genre,$user);
|
||||||
|
|
||||||
/* Record this play to LastFM */
|
|
||||||
if ($this->prefs['lastfm_user'] AND $this->prefs['lastfm_pass']) {
|
|
||||||
$song_info->format_song();
|
|
||||||
$lastfm = new scrobbler($this->prefs['lastfm_user'],$this->prefs['lastfm_pass']);
|
|
||||||
/* Attempt handshake */
|
|
||||||
if ($lastfm->handshake()) {
|
|
||||||
if (!$lastfm->queue_track($song_info->f_artist_full,$song_info->f_album_full,$song_info->title,time(),$song_info->time)) {
|
|
||||||
debug_event('LastFM','Error: Queue Failed' . $lastfm->error_msg,'3');
|
|
||||||
}
|
|
||||||
if (!$lastfm->submit_tracks()) {
|
|
||||||
debug_event('LastFM','Error Submit Failed' . $lastfm->error_msg,'3');
|
|
||||||
}
|
|
||||||
} // if handshake
|
|
||||||
else {
|
|
||||||
debug_event('LastFM','Error: Handshake failed with LastFM:' . $lastfm->error_msg,'3');
|
|
||||||
}
|
|
||||||
} // record to LastFM
|
|
||||||
else {
|
|
||||||
debug_event('plugins','Error: No Prefs','3');
|
|
||||||
}
|
|
||||||
|
|
||||||
} // update_stats
|
} // update_stats
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -190,8 +190,6 @@ require_once(conf('prefix') . '/lib/class/access.class.php');
|
||||||
require_once(conf('prefix') . '/lib/class/error.class.php');
|
require_once(conf('prefix') . '/lib/class/error.class.php');
|
||||||
require_once(conf('prefix') . '/lib/class/genre.class.php');
|
require_once(conf('prefix') . '/lib/class/genre.class.php');
|
||||||
require_once(conf('prefix') . '/lib/class/flag.class.php');
|
require_once(conf('prefix') . '/lib/class/flag.class.php');
|
||||||
require_once(conf('prefix') . '/lib/class/audioscrobbler.class.php');
|
|
||||||
|
|
||||||
|
|
||||||
/* Set a new Error Handler */
|
/* Set a new Error Handler */
|
||||||
$old_error_handler = set_error_handler("ampache_error_handler");
|
$old_error_handler = set_error_handler("ampache_error_handler");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue