From c5a0b5ef0bfd7c8800cbed515c5b08a6207bfcdf Mon Sep 17 00:00:00 2001
From: labrys <labrys@users.noreply.github.com>
Date: Sat, 2 Jan 2016 21:17:46 -0500
Subject: [PATCH] Hotfix-Issue 90: Fix API to match SB API

Correct API Builder description to match expected functionality
---
 sickbeard/webapi.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py
index 0403c3234..be38f1b8e 100644
--- a/sickbeard/webapi.py
+++ b/sickbeard/webapi.py
@@ -2775,7 +2775,7 @@ class CMD_Shows(ApiCall):
         "desc": "Get all shows in SickRage",
         "optionalParameters": {
             "sort": {"desc": "The sorting strategy to apply to the list of shows"},
-            "paused": {"desc": "True to include paused shows, False otherwise"},
+            "paused": {"desc": "True: show paused, False: show un-paused, otherwise show all"},
         },
     }
 
@@ -2791,9 +2791,9 @@ class CMD_Shows(ApiCall):
         """ Get all shows in SickRage """
         shows = {}
         for curShow in sickbeard.showList:
-
-            if not self.paused and curShow.paused:  # If we're not including paused shows, and the current show is paused
-                continue  # continue with the next show
+            # If self.paused is None: show all, 0: show un-paused, 1: show paused
+            if self.paused is not None and self.paused != curShow.paused:
+                    continue
 
             indexer_show = helpers.mapIndexersToShow(curShow)
 
-- 
GitLab