1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 02:39:47 +02:00

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....

This commit is contained in:
Karl 'vollmerk' Vollmer 2007-09-03 23:04:20 +00:00
parent 93e8513b5b
commit e0811ddab0
8 changed files with 158 additions and 12 deletions

View file

@ -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;
}