diff --git a/app/SupportedApps/Sonarr.php b/app/SupportedApps/Sonarr.php index 93b4ef1b..052b43b3 100644 --- a/app/SupportedApps/Sonarr.php +++ b/app/SupportedApps/Sonarr.php @@ -87,7 +87,7 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats { } return $missing; } - + public function getQueue() { $config = $this->config; @@ -96,7 +96,7 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats { $api_url = $url.'/api/queue?apikey='.$config->apiKey.'&pageSize=1'; $client = new Client(['http_errors' => false, 'timeout' => 15, 'connect_timeout' => 15]); $res = $client->request('GET', $api_url); - $queue count($res->getBody()); + $queue = count(json_decode($res->getBody())); return $queue; } }