diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-12-12 21:59:35 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-12-12 21:59:35 +0000 |
commit | cdb41b515a8989e61446118d54f4f25b00bb5702 (patch) | |
tree | 9b6870e95786ca6b4bf49d0de917ac4dc3bbcf12 /lib/class/user.class.php | |
parent | 504cd93ea89844219a1642a9acdb5797a3e303c1 (diff) | |
download | ampache-cdb41b515a8989e61446118d54f4f25b00bb5702.tar.gz ampache-cdb41b515a8989e61446118d54f4f25b00bb5702.tar.bz2 ampache-cdb41b515a8989e61446118d54f4f25b00bb5702.zip |
commiting crap in a hurry for loss and profit
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r-- | lib/class/user.class.php | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 14fa4abc..fefca81f 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -433,7 +433,7 @@ class User { $song_info = new Song($song_id); //FIXME:: User uid reference $user = $this->uid; - + if (!$song_info->file) { return false; } $stats = new Stats(); @@ -442,42 +442,6 @@ class User { $stats->insert('artist',$song_info->artist,$user); $stats->insert('genre',$song_info->genre,$user); - /** - * Record this play to LastFM - * because it lags like the dickens try twice on everything - */ - 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 */ - $handshake = $lastfm->handshake(); - - /* We failed, try again */ - if (!$handshake) { sleep(1); $handshake = $lastfm->handshake(); } - - - if ($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'); - } - - $submit = $lastfm->submit_tracks(); - - /* Try again if it fails */ - if (!$submit) { sleep(1); $submit = $lastfm->submit_tracks(); } - - if (!$submit) { - 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 /** |