summaryrefslogtreecommitdiffstats
path: root/modules/plugins
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-03 23:04:20 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-03 23:04:20 +0000
commite0811ddab09e4574e2d595846b79b54f90b1cbf9 (patch)
tree3d6398ef2a59ff68e6bdbbad307afcd0e53b6f85 /modules/plugins
parent93e8513b5be87aa7cc3db26d7e0c37be938efb07 (diff)
downloadampache-e0811ddab09e4574e2d595846b79b54f90b1cbf9.tar.gz
ampache-e0811ddab09e4574e2d595846b79b54f90b1cbf9.tar.bz2
ampache-e0811ddab09e4574e2d595846b79b54f90b1cbf9.zip
fixed playlist name editing, cant change the type or the genre yet, tweaked lastfm so it recovers from errors a little better, fixed a stupid typo....
Diffstat (limited to 'modules/plugins')
-rw-r--r--modules/plugins/Lastfm.plugin.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/plugins/Lastfm.plugin.php b/modules/plugins/Lastfm.plugin.php
index 20de8ea5..fd9cca82 100644
--- a/modules/plugins/Lastfm.plugin.php
+++ b/modules/plugins/Lastfm.plugin.php
@@ -102,13 +102,24 @@ class AmpacheLastfm {
// Create our scrobbler with everything this time and then queue it
$scrobbler = new scrobbler($this->username,$this->password,$this->hostname,$this->port,$this->path,$this->challenge);
+
+ // Check to see if the scrobbling works
if (!$scrobbler->queue_track($song->f_artist_full,$song->f_album_full,$song->title,time(),$song->time,$song->track)) {
+ // Depending on the error we might need to do soemthing here
return false;
}
// Go ahead and submit it now
if (!$scrobbler->submit_tracks()) {
debug_event('LastFM','Error Submit Failed: ' . $scrobbler->error_msg,'3');
+ if ($scrobbler->reset_handshake) {
+ debug_event('LastFM','Re-running Handshake due to error','3');
+ $this->set_handshake($user_id);
+ // Try try again
+ if ($scrobbler->submit_tracks()) {
+ return true;
+ }
+ }
return false;
}