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()