|
@ -9,7 +9,7 @@ class Sabnzbd implements Contracts\Applications, Contracts\Livestats { |
|
|
|
|
|
|
|
|
public function defaultColour() |
|
|
public function defaultColour() |
|
|
{ |
|
|
{ |
|
|
return '#655509'; |
|
|
return '#463b06'; |
|
|
} |
|
|
} |
|
|
public function icon() |
|
|
public function icon() |
|
|
{ |
|
|
{ |
|
@ -24,7 +24,12 @@ class Sabnzbd implements Contracts\Applications, Contracts\Livestats { |
|
|
$res = $this->buildRequest('queue'); |
|
|
$res = $this->buildRequest('queue'); |
|
|
switch($res->getStatusCode()) { |
|
|
switch($res->getStatusCode()) { |
|
|
case 200: |
|
|
case 200: |
|
|
|
|
|
$data = json_decode($res->getBody()); |
|
|
|
|
|
if(isset($data->error) && !empty($data->error)) { |
|
|
|
|
|
echo 'Failed: '.$data->error; |
|
|
|
|
|
} else { |
|
|
echo 'Successfully connected to the API'; |
|
|
echo 'Successfully connected to the API'; |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 401: |
|
|
case 401: |
|
|
echo 'Failed: Invalid credentials'; |
|
|
echo 'Failed: Invalid credentials'; |
|
|