summaryrefslogtreecommitdiffstats
path: root/lib/class/scrobbler.class.php
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 /lib/class/scrobbler.class.php
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 'lib/class/scrobbler.class.php')
-rw-r--r--lib/class/scrobbler.class.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/class/scrobbler.class.php b/lib/class/scrobbler.class.php
index d01b5000..78c5f36e 100644
--- a/lib/class/scrobbler.class.php
+++ b/lib/class/scrobbler.class.php
@@ -29,6 +29,7 @@ class scrobbler {
public $submit_port;
public $submit_url;
public $queued_tracks;
+ public $reset_handshake = false;
/**
* Constructor
@@ -206,16 +207,19 @@ class scrobbler {
$split_response = preg_split("/\r\n\r\n/", $buffer);
if(!isset($split_response[1])) {
$this->error_msg = 'Did not receive a valid response';
+ $this->reset_handshake = true;
return false;
}
$response = explode("\n", $split_response[1]);
if(!isset($response[0])) {
$this->error_msg = 'Unknown error submitting tracks'.
"\nDebug output:\n".$buffer;
+ $this->reset_handshake = true;
return false;
}
if(substr($response[0], 0, 6) == 'FAILED') {
$this->error_msg = $response[0];
+ $this->reset_handshake = true;
return false;
}
if(substr($response[0], 0, 7) == 'BADAUTH') {
@@ -224,11 +228,13 @@ class scrobbler {
}
if (substr($response[0],0,10) == 'BADSESSION') {
$this->error_msg = 'Invalid Session passed (' . trim($response[0]) . ')';
+ $this->reset_handshake = true;
return false;
}
if(substr($response[0], 0, 2) != 'OK') {
$this->error_msg = 'Response Not ok, unknown error'.
"\nDebug output:\n".$buffer;
+ $this->reset_handshake = true;
return false;
}