From 1003e342caee2f8667d77a524b7f15668bc237ba Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 24 Nov 2014 10:44:26 -0800 Subject: [PATCH] Improved WebAPI interface: sb.searchindexers searches ALL indexers sb.searchtvrage searches TVRage indexer sb.searchtvdb searches TVDB indexer --- sickbeard/webapi.py | 231 +++++++++++++++++++++++++++----------------- 1 file changed, 141 insertions(+), 90 deletions(-) diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index b7c02651..17530015 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -380,7 +380,7 @@ class ApiCall(object): key = "tvrageid" self.indexer = indexer_ids.index(key) - + missing = True orgDefault = default @@ -699,7 +699,7 @@ class CMD_Help(ApiCall): # required # optional self.subject, args = self.check_params(args, kwargs, "subject", "help", False, "string", - _functionMaper.keys()) + _functionMaper.keys()) ApiCall.__init__(self, handler, args, kwargs) def run(self): @@ -724,13 +724,13 @@ class CMD_ComingEpisodes(ApiCall): # required # optional self.sort, args = self.check_params(args, kwargs, "sort", "date", False, "string", - ["date", "show", "network"]) + ["date", "show", "network"]) self.type, args = self.check_params(args, kwargs, "type", "today|missed|soon|later", False, - "list", - ["missed", "later", "today", "soon"]) + "list", + ["missed", "later", "today", "soon"]) self.paused, args = self.check_params(args, kwargs, "paused", sickbeard.COMING_EPS_DISPLAY_PAUSED, - False, "int", - [0, 1]) + False, "int", + [0, 1]) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -833,12 +833,15 @@ class CMD_ComingEpisodes(ApiCall): class CMD_Episode(ApiCall): _help = {"desc": "display detailed info about an episode", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, - "season": {"desc": "the season number"}, - "episode": {"desc": "the episode number"} + "indexerid": {"desc": "unique id of a show"}, + "season": {"desc": "the season number"}, + "episode": {"desc": "the episode number"} }, - "optionalParameters": {"full_path": { - "desc": "show the full absolute path (if valid) instead of a relative path for the episode location"} + "optionalParameters": { + "tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, + "full_path": { + "desc": "show the full absolute path (if valid) instead of a relative path for the episode location"} } } @@ -896,9 +899,13 @@ class CMD_Episode(ApiCall): class CMD_EpisodeSearch(ApiCall): _help = {"desc": "search for an episode. the response might take some time", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, - "season": {"desc": "the season number"}, - "episode": {"desc": "the episode number"} + "indexerid": {"desc": "unique id of a show"}, + "season": {"desc": "the season number"}, + "episode": {"desc": "the episode number"} + }, + "optionalParameters": { + "tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, } } @@ -943,13 +950,17 @@ class CMD_EpisodeSearch(ApiCall): class CMD_EpisodeSetStatus(ApiCall): _help = {"desc": "set status of an episode or season (when no ep is provided)", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, - "season": {"desc": "the season number"}, - "status": {"desc": "the status values: wanted, skipped, archived, ignored, failed"} + "indexerid": {"desc": "unique id of a show"}, + "season": {"desc": "the season number"}, + "status": {"desc": "the status values: wanted, skipped, archived, ignored, failed"} }, - "optionalParameters": {"episode": {"desc": "the episode number"}, - "force": {"desc": "should we replace existing (downloaded) episodes or not"} + "optionalParameters": { + "episode": {"desc": "the episode number"}, + "force": {"desc": "should we replace existing (downloaded) episodes or not"}, + "tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, } + } def __init__(self, handler, args, kwargs): @@ -957,7 +968,7 @@ class CMD_EpisodeSetStatus(ApiCall): self.indexerid, args = self.check_params(args, kwargs, "indexerid", None, True, "int", []) self.s, args = self.check_params(args, kwargs, "season", None, True, "int", []) self.status, args = self.check_params(args, kwargs, "status", None, True, "string", - ["wanted", "skipped", "archived", "ignored", "failed"]) + ["wanted", "skipped", "archived", "ignored", "failed"]) # optional self.e, args = self.check_params(args, kwargs, "episode", None, False, "int", []) self.force, args = self.check_params(args, kwargs, "force", 0, False, "bool", []) @@ -1054,9 +1065,13 @@ class CMD_EpisodeSetStatus(ApiCall): class CMD_SubtitleSearch(ApiCall): _help = {"desc": "search episode subtitles. the response might take some time", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, - "season": {"desc": "the season number"}, - "episode": {"desc": "the episode number"} + "indexerid": {"desc": "unique id of a show"}, + "season": {"desc": "the season number"}, + "episode": {"desc": "the episode number"} + }, + "optionalParameters": { + "tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, } } @@ -1107,7 +1122,9 @@ class CMD_SubtitleSearch(ApiCall): class CMD_Exceptions(ApiCall): _help = {"desc": "display scene exceptions for all or a given show", "optionalParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid": {"desc": "unique id of a show"}, + "tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, } } @@ -1158,7 +1175,7 @@ class CMD_History(ApiCall): # optional self.limit, args = self.check_params(args, kwargs, "limit", 100, False, "int", []) self.type, args = self.check_params(args, kwargs, "type", None, False, "string", - ["downloaded", "snatched"]) + ["downloaded", "snatched"]) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -1254,7 +1271,7 @@ class CMD_Logs(ApiCall): # required # optional self.min_level, args = self.check_params(args, kwargs, "min_level", "error", False, "string", - ["error", "warning", "info", "debug"]) + ["error", "warning", "info", "debug"]) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -1323,10 +1340,10 @@ class CMD_PostProcess(ApiCall): self.force_replace, args = self.check_params(args, kwargs, "force_replace", 0, False, "bool", []) self.return_data, args = self.check_params(args, kwargs, "return_data", 0, False, "bool", []) self.process_method, args = self.check_params(args, kwargs, "process_method", False, False, - "string", ["copy", "symlink", "hardlink", "move"]) + "string", ["copy", "symlink", "hardlink", "move"]) self.is_priority, args = self.check_params(args, kwargs, "is_priority", 0, False, "bool", []) self.type, args = self.check_params(args, kwargs, "type", "auto", None, "string", - ["auto", "manual"]) + ["auto", "manual"]) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -1605,9 +1622,9 @@ class CMD_SickBeardRestart(ApiCall): class CMD_SickBeardSearchIndexers(ApiCall): _help = {"desc": "search for show on the indexers with a given string and language", "optionalParameters": {"name": {"desc": "name of the show you want to search for"}, - "indexerid or tvdbid or tvrageid": { - "desc": "thetvdb.com or tvrage.com unique id of a show"}, - "indexer": {"desc": "0=auto, 1=tvdb, 2=tvrage"}, + "indexerid": {"desc": "unique id of a show"}, + "tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, "lang": {"desc": "the 2 letter abbreviation lang id"} } } @@ -1691,6 +1708,35 @@ class CMD_SickBeardSearchIndexers(ApiCall): return _responds(RESULT_FAILURE, msg="Either a unique id or name is required!") +class CMD_SickBeardSearchTVDB(CMD_SickBeardSearchIndexers): + _help = {"desc": "search for show on theTVDB with a given string and language", + "optionalParameters": {"name": {"desc": "name of the show you want to search for"}, + "tvdbid": { + "desc": "thetvdb.com unique id of a show"}, + "lang": {"desc": "the 2 letter abbreviation lang id"} + } + } + + + def __init__(self, handler, args, kwargs): + self.indexer = 1 + CMD_SickBeardSearchIndexers.__init__(self, handler, args, kwargs) + + +class CMD_SickBeardSearchTVRAGE(CMD_SickBeardSearchIndexers): + _help = {"desc": "search for show on TVRage with a given string and language", + "optionalParameters": {"name": {"desc": "name of the show you want to search for"}, + "tvrageid": { + "desc": "tvrage.com unique id of a show"}, + "lang": {"desc": "the 2 letter abbreviation lang id"} + } + } + + def __init__(self, handler, args, kwargs): + self.indexer = 2 + CMD_SickBeardSearchIndexers.__init__(self, handler, args, kwargs) + + class CMD_SickBeardSetDefaults(ApiCall): _help = {"desc": "set sickrage user defaults", "optionalParameters": {"initial": {"desc": "initial quality for the show"}, @@ -1704,18 +1750,18 @@ class CMD_SickBeardSetDefaults(ApiCall): # required # optional self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", - ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) + ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", - ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", - "hdbluray", "fullhdbluray"]) + ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", + "hdbluray", "fullhdbluray"]) self.future_show_paused, args = self.check_params(args, kwargs, "future_show_paused", None, False, - "bool", []) + "bool", []) self.flatten_folders, args = self.check_params(args, kwargs, "flatten_folders", None, False, - "bool", []) + "bool", []) self.status, args = self.check_params(args, kwargs, "status", None, False, "string", - ["wanted", "skipped", "archived", "ignored"]) + ["wanted", "skipped", "archived", "ignored"]) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -1787,8 +1833,12 @@ class CMD_SickBeardShutdown(ApiCall): class CMD_Show(ApiCall): _help = {"desc": "display information for a given show", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid": {"desc": "unique id of a show"}, + }, + "optionalParameters": {"tvdbid": {"desc": "thetvdb.com unique id of a show"}, + "tvrageid": {"desc": "tvrage.com unique id of a show"}, } + } def __init__(self, handler, args, kwargs): @@ -1806,8 +1856,7 @@ class CMD_Show(ApiCall): showDict = {} showDict["season_list"] = CMD_ShowSeasonList(self.handler, (), {"indexerid": self.indexerid}).run()["data"] - showDict["cache"] = CMD_ShowCache(self.handler, (), {"indexerid": self.indexerid}).run()[ - "data"] + showDict["cache"] = CMD_ShowCache(self.handler, (), {"indexerid": self.indexerid}).run()["data"] genreList = [] if showObj.genre: @@ -1835,11 +1884,13 @@ class CMD_Show(ApiCall): showDict["flatten_folders"] = showObj.flatten_folders showDict["sports"] = showObj.sports showDict["anime"] = showObj.anime - # clean up tvdb horrible airs field showDict["airs"] = str(showObj.airs).replace('am', ' AM').replace('pm', ' PM').replace(' ', ' ') - showDict["indexerid"] = self.indexerid + + showDict["indexerid"] = showObj.indexerid + showDict["tvdbid"] = helpers.mapIndexersToShow(showObj)[1] showDict["tvrage_id"] = helpers.mapIndexersToShow(showObj)[2] showDict["tvrage_name"] = showObj.name + showDict["network"] = showObj.network if not showDict["network"]: showDict["network"] = "" @@ -1876,17 +1927,17 @@ class CMD_ShowAddExisting(ApiCall): self.location, args = self.check_params(args, kwargs, "location", None, True, "string", []) # optional self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", - ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) + ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", - ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", - "hdbluray", "fullhdbluray"]) + ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", + "hdbluray", "fullhdbluray"]) self.flatten_folders, args = self.check_params(args, kwargs, "flatten_folders", - str(sickbeard.FLATTEN_FOLDERS_DEFAULT), False, - "bool", []) + str(sickbeard.FLATTEN_FOLDERS_DEFAULT), False, + "bool", []) self.subtitles, args = self.check_params(args, kwargs, "subtitles", int(sickbeard.USE_SUBTITLES), - False, "int", []) + False, "int", []) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -1973,27 +2024,27 @@ class CMD_ShowAddNew(ApiCall): # optional self.location, args = self.check_params(args, kwargs, "location", None, False, "string", []) self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", - ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) + ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", - ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", - "hdbluray", "fullhdbluray"]) + ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", + "hdbluray", "fullhdbluray"]) self.flatten_folders, args = self.check_params(args, kwargs, "flatten_folders", - str(sickbeard.FLATTEN_FOLDERS_DEFAULT), False, - "bool", []) + str(sickbeard.FLATTEN_FOLDERS_DEFAULT), False, + "bool", []) self.status, args = self.check_params(args, kwargs, "status", None, False, "string", - ["wanted", "skipped", "archived", "ignored"]) + ["wanted", "skipped", "archived", "ignored"]) self.lang, args = self.check_params(args, kwargs, "lang", "en", False, "string", - self.valid_languages.keys()) + self.valid_languages.keys()) self.subtitles, args = self.check_params(args, kwargs, "subtitles", int(sickbeard.USE_SUBTITLES), - False, "int", + False, "int", []) self.anime, args = self.check_params(args, kwargs, "anime", int(sickbeard.ANIME_DEFAULT), False, - "int", + "int", []) self.scene, args = self.check_params(args, kwargs, "scene", int(sickbeard.SCENE_DEFAULT), False, - "int", + "int", []) # super, missing, help @@ -2098,7 +2149,7 @@ class CMD_ShowAddNew(ApiCall): class CMD_ShowCache(ApiCall): _help = {"desc": "check sickrage's cache to see if the banner or poster image for a show is valid", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} } } @@ -2134,7 +2185,7 @@ class CMD_ShowCache(ApiCall): class CMD_ShowDelete(ApiCall): _help = {"desc": "delete a show in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, } } @@ -2162,7 +2213,7 @@ class CMD_ShowDelete(ApiCall): class CMD_ShowGetQuality(ApiCall): _help = {"desc": "get quality setting for a show in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} } } @@ -2187,7 +2238,7 @@ class CMD_ShowGetQuality(ApiCall): class CMD_ShowGetPoster(ApiCall): _help = {"desc": "get the poster stored for a show in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} } } @@ -2206,7 +2257,7 @@ class CMD_ShowGetPoster(ApiCall): class CMD_ShowGetBanner(ApiCall): _help = {"desc": "get the banner stored for a show in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} } } @@ -2225,7 +2276,7 @@ class CMD_ShowGetBanner(ApiCall): class CMD_ShowPause(ApiCall): _help = {"desc": "set a show's paused state in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, }, "optionalParameters": {"pause": {"desc": "set the pause state of the show"} } @@ -2258,7 +2309,7 @@ class CMD_ShowPause(ApiCall): class CMD_ShowRefresh(ApiCall): _help = {"desc": "refresh a show in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, } } @@ -2286,7 +2337,7 @@ class CMD_ShowRefresh(ApiCall): class CMD_ShowSeasonList(ApiCall): _help = {"desc": "display the season list for a given show", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, }, "optionalParameters": {"sort": {"desc": "change the sort order from descending to ascending"} } @@ -2297,8 +2348,8 @@ class CMD_ShowSeasonList(ApiCall): self.indexerid, args = self.check_params(args, kwargs, "indexerid", None, True, "int", []) # optional self.sort, args = self.check_params(args, kwargs, "sort", "desc", False, "string", - ["asc", - "desc"]) # "asc" and "desc" default and fallback is "desc" + ["asc", + "desc"]) # "asc" and "desc" default and fallback is "desc" # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -2325,7 +2376,7 @@ class CMD_ShowSeasonList(ApiCall): class CMD_ShowSeasons(ApiCall): _help = {"desc": "display a listing of episodes for all or a given season", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, }, "optionalParameters": {"season": {"desc": "the season number"}, } @@ -2394,7 +2445,7 @@ class CMD_ShowSetQuality(ApiCall): _help = { "desc": "set desired quality of a show in sickrage. if neither initial or archive are provided then the config default quality will be used", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"} }, "optionalParameters": {"initial": {"desc": "initial quality for the show"}, "archive": {"desc": "archive quality for the show"} @@ -2408,12 +2459,12 @@ class CMD_ShowSetQuality(ApiCall): # this for whatever reason removes hdbluray not sdtv... which is just wrong. reverting to previous code.. plus we didnt use the new code everywhere. # self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", _getQualityMap().values()[1:]) self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", - ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) + ["sdtv", "sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown"]) self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", - ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", - "fullhdwebdl", - "hdbluray", "fullhdbluray"]) + ["sddvd", "hdtv", "rawhdtv", "fullhdtv", "hdwebdl", + "fullhdwebdl", + "hdbluray", "fullhdbluray"]) # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -2459,7 +2510,7 @@ class CMD_ShowSetQuality(ApiCall): class CMD_ShowStats(ApiCall): _help = {"desc": "display episode statistics for a given show", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, } } @@ -2564,7 +2615,7 @@ class CMD_ShowStats(ApiCall): class CMD_ShowUpdate(ApiCall): _help = {"desc": "update a show in sickrage", "requiredParameters": { - "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, + "indexerid or tvdbid or tvrageid": {"desc": "thetvdb.com or tvrage.com unique id of a show"}, } } @@ -2592,8 +2643,8 @@ class CMD_ShowUpdate(ApiCall): class CMD_Shows(ApiCall): _help = {"desc": "display all shows in sickrage", "optionalParameters": { - "sort": {"desc": "sort the list of shows by show name instead of indexer unique id"}, - "paused": {"desc": "only show the shows that are set to paused"}, + "sort": {"desc": "sort the list of shows by show name instead of indexer unique id"}, + "paused": {"desc": "only show the shows that are set to paused"}, }, } @@ -2622,7 +2673,7 @@ class CMD_Shows(ApiCall): "anime": curShow.anime, "indexerid": curShow.indexerid, "tvdbid": helpers.mapIndexersToShow(curShow)[1], - "tvrageid": helpers.mapIndexersToShow(curShow)[2], + "tvrage_id": helpers.mapIndexersToShow(curShow)[2], "tvrage_name": curShow.name, "network": curShow.network, "show_name": curShow.name, @@ -2638,7 +2689,7 @@ class CMD_Shows(ApiCall): showDict['next_ep_airdate'] = '' showDict["cache"] = \ - CMD_ShowCache(self.handler, (), {"indexerid or tvdbid or tvrageid": curShow.indexerid}).run()["data"] + CMD_ShowCache(self.handler, (), {"indexerid or tvdbid or tvrageid": curShow.indexerid}).run()["data"] if not showDict["network"]: showDict["network"] = "" if self.sort == "name": @@ -2707,8 +2758,8 @@ _functionMaper = {"help": CMD_Help, "sb.ping": CMD_SickBeardPing, "sb.restart": CMD_SickBeardRestart, "sb.searchindexers": CMD_SickBeardSearchIndexers, - "sb.searchtvdb": CMD_SickBeardSearchIndexers, - "sb.searchtvrage": CMD_SickBeardSearchIndexers, + "sb.searchtvdb": CMD_SickBeardSearchTVDB, + "sb.searchtvrage": CMD_SickBeardSearchTVRAGE, "sb.setdefaults": CMD_SickBeardSetDefaults, "sb.shutdown": CMD_SickBeardShutdown, "show": CMD_Show,