From aa19bd04a0600418242a36761d770e56623e1ad1 Mon Sep 17 00:00:00 2001 From: alxlaxv <35723598+alxlaxv@users.noreply.github.com> Date: Sat, 20 Oct 2018 00:23:08 +0200 Subject: [PATCH] Fixing Activity --- app/SupportedApps/Sonarr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }