From 53e20144487d033cf4079ecde1f295bcd9b1d8fe Mon Sep 17 00:00:00 2001 From: alxlaxv <35723598+alxlaxv@users.noreply.github.com> Date: Fri, 19 Oct 2018 23:27:55 +0200 Subject: [PATCH] Update Sonarr.php --- app/SupportedApps/Sonarr.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/SupportedApps/Sonarr.php b/app/SupportedApps/Sonarr.php index 98cfea30..f41213ba 100644 --- a/app/SupportedApps/Sonarr.php +++ b/app/SupportedApps/Sonarr.php @@ -76,8 +76,7 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats { $url = rtrim($url, '/'); $api_url = $url.'/api/wanted/missing?apikey='.$config->apiKey.'&pageSize=1'; $client = new Client(['http_errors' => false, 'timeout' => 15, 'connect_timeout' => 15]); - $res = $client->request('GET', $api_url); - echo $res; + $res = $client->request('GET', $api_url)->getBody(); $json = json_decode($res); $missing = $json->totalRecords; if (empty($missing)) @@ -94,8 +93,7 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats { $url = rtrim($url, '/'); $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); - echo $res; + $res = $client->request('GET', $api_url)->getBody(); $queue = sizeof($res); return $queue; }