1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fixed sickragetv/sickrage-issues#79 - kwargs where not being properly parsed from API class

This commit is contained in:
echel0n 2014-12-17 01:44:07 -08:00
parent 9eefc8034b
commit 261efe25d0

View File

@ -79,6 +79,10 @@ class ApiHandler(RequestHandler):
def get(self, *args, **kwargs):
kwargs = self.request.arguments
for arg, value in kwargs.items():
if len(value) == 1:
kwargs[arg] = value[0]
args = args[1:]
# set the output callback
@ -159,7 +163,8 @@ class ApiHandler(RequestHandler):
del kwargs["cmd"]
outDict = {}
if cmds != None:
if cmds is not None:
cmds = cmds.split("|")
multiCmds = bool(len(cmds) > 1)
for cmd in cmds:
curArgs, curKwargs = self.filter_params(cmd, args, kwargs)