From be6c884a40948bc5d74f696d14233cd35c8c13a4 Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 11 Jul 2014 10:42:42 -0700 Subject: [PATCH] Fixed WEBApi issues for adding new shows. --- sickbeard/webapi.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index e42873da..2d4cac0d 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -1857,8 +1857,9 @@ class CMD_ShowAddExisting(ApiCall): if iqualityID or aqualityID: newQuality = Quality.combineQualities(iqualityID, aqualityID) - sickbeard.showQueueScheduler.action.addShow(int(self.indexer), int(self.indexerid), self.location, SKIPPED, newQuality, - int(self.flatten_folders)) #@UndefinedVariable + sickbeard.showQueueScheduler.action.addShow(int(self.indexer), int(self.indexerid), self.location, SKIPPED, + newQuality, int(self.flatten_folders)) + return _responds(RESULT_SUCCESS, {"name": indexerName}, indexerName + " has been queued to be added") @@ -1910,6 +1911,11 @@ class CMD_ShowAddNew(ApiCall): self.lang, args = self.check_params(args, kwargs, "lang", "en", False, "string", self.valid_languages.keys()) self.subtitles, args = self.check_params(args, kwargs, "subtitles", int(sickbeard.USE_SUBTITLES), False, "int", []) + self.anime, args = self.check_params(args, kwargs, "anime", int(sickbeard.ANIME_DEFAULT), False, "int", + []) + self.scene, args = self.check_params(args, kwargs, "scene", int(sickbeard.SCENE_DEFAULT), False, "int", + []) + # super, missing, help ApiCall.__init__(self, handler, args, kwargs) @@ -2001,8 +2007,9 @@ class CMD_ShowAddNew(ApiCall): helpers.chmodAsParent(showPath) sickbeard.showQueueScheduler.action.addShow(int(self.indexer), int(self.indexerid), showPath, newStatus, newQuality, - int(self.flatten_folders), self.subtitles, - self.lang) #@UndefinedVariable + int(self.flatten_folders), self.lang, self.subtitles, self.anime, + self.scene) # @UndefinedVariable + return _responds(RESULT_SUCCESS, {"name": indexerName}, indexerName + " has been queued to be added")