From 6e7c2df03228f12bec84dd9352145c7aff8b9136 Mon Sep 17 00:00:00 2001 From: alxlaxv <35723598+alxlaxv@users.noreply.github.com> Date: Fri, 19 Oct 2018 22:56:48 +0200 Subject: [PATCH] Update Sonarr.php --- app/SupportedApps/Sonarr.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/SupportedApps/Sonarr.php b/app/SupportedApps/Sonarr.php index de03f134..7711b0c3 100644 --- a/app/SupportedApps/Sonarr.php +++ b/app/SupportedApps/Sonarr.php @@ -51,8 +51,8 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats $active = 'active'; $html = ' '; return json_encode(['status' => $active, 'html' => $html]); @@ -69,7 +69,7 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats return $res; } - public function getWanted() + public function getMissing() { $config = $this->config; $url = $config->url; @@ -77,12 +77,12 @@ class Sonarr implements Contracts\Applications, Contracts\Livestats $api_url = $url . '/api/wanted/missing?apikey=' . $config->apiKey . '&pageSize=1'; $client = new Client(['http_errors' => false, 'timeout' => 15, 'connect_timeout' => 15]); $res = json_decode($client->request('GET', $api_url)); - $wanted = $res->totalRecords; - if (empty($wanted)) + $missing = $res->totalRecords; + if (empty($missing)) { - $wanted = 0; + $missing = 0; } - return $wanted; + return $missing; } public function getQueue()