summaryrefslogtreecommitdiffstats
path: root/lib/class/scrobbler.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-10-30 16:51:40 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-10-30 16:51:40 +0000
commitdac46f0b6e8e4d5dff51b3f5b97f6cc5332f7b88 (patch)
tree41f6c048ce0741bf153b8818571ec39dc42acdfc /lib/class/scrobbler.class.php
parent9a251be9a6e99e781725064062a391fdd708bbd3 (diff)
downloadampache-dac46f0b6e8e4d5dff51b3f5b97f6cc5332f7b88.tar.gz
ampache-dac46f0b6e8e4d5dff51b3f5b97f6cc5332f7b88.tar.bz2
ampache-dac46f0b6e8e4d5dff51b3f5b97f6cc5332f7b88.zip
added in badtime error check and made it return the buffer on unknown errors to help debugging
Diffstat (limited to 'lib/class/scrobbler.class.php')
-rw-r--r--lib/class/scrobbler.class.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/class/scrobbler.class.php b/lib/class/scrobbler.class.php
index 7806085c..ba74353a 100644
--- a/lib/class/scrobbler.class.php
+++ b/lib/class/scrobbler.class.php
@@ -108,6 +108,10 @@ class scrobbler {
$this->error_msg = 'Invalid Username';
return false;
}
+ if(substr($response[0],0,7) == 'BADTIME') {
+ $this->error_msg = 'Your time is too far off from the server, or your timezone is incorrect';
+ return false;
+ }
if(substr($response[0], 0, 6) == 'UPDATE') {
$this->error_msg = 'You need to update your client: '.substr($response[0], 7);
return false;
@@ -118,7 +122,7 @@ class scrobbler {
$data['submit_port'] = $matches[2];
$data['submit_url'] = $matches[3];
} else {
- $this->error_msg = 'Invalid POST URL returned, unable to continue';
+ $this->error_msg = "Invalid POST URL returned, unable to continue. Received:\n" . $buffer;
return false;
}