mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-05 17:05:03 -05:00
WebAPI showPosters fixed!
This commit is contained in:
parent
bd582d18d0
commit
0ae8b5429b
@ -296,10 +296,11 @@ def filter_params(cmd, args, kwargs):
|
||||
return curArgs, curKwargs
|
||||
|
||||
|
||||
class ApiCall(Api):
|
||||
class ApiCall(webserve.IndexHandler):
|
||||
_help = {"desc": "No help message available. Please tell the devs that a help msg is missing for this cmd"}
|
||||
|
||||
def __init__(self, args, kwargs):
|
||||
|
||||
# missing
|
||||
try:
|
||||
if self._missing:
|
||||
@ -2103,7 +2104,7 @@ class CMD_ShowGetPoster(ApiCall):
|
||||
|
||||
def run(self):
|
||||
""" get the poster for a show in sickbeard """
|
||||
return {'outputType': 'image', 'image': webserve.IndexHandler(self.application, self.request).showPoster(self.indexerid, 'poster')}
|
||||
return {'outputType': 'image', 'image': self.showPoster(self.indexerid, 'poster')}
|
||||
|
||||
|
||||
class CMD_ShowGetBanner(ApiCall):
|
||||
@ -2121,7 +2122,7 @@ class CMD_ShowGetBanner(ApiCall):
|
||||
|
||||
def run(self):
|
||||
""" get the banner for a show in sickbeard """
|
||||
return {'outputType': 'image', 'image': webserve.IndexHandler(self.application, self.request).showPoster(self.indexerid, 'banner')}
|
||||
return {'outputType': 'image', 'image': self.showPoster(self.indexerid, 'banner')}
|
||||
|
||||
|
||||
class CMD_ShowPause(ApiCall):
|
||||
|
@ -223,9 +223,12 @@ class IndexHandler(RequestHandler):
|
||||
response = yield gen.Task(self.getresponse, self._dispatch)
|
||||
self.finish(response)
|
||||
|
||||
@asynchronous
|
||||
@gen.engine
|
||||
def post(self, *args, **kwargs):
|
||||
return self._dispatch()
|
||||
|
||||
response = yield gen.Task(self.getresponse, self._dispatch)
|
||||
self.finish(response)
|
||||
|
||||
def getresponse(self, func, callback):
|
||||
response = func()
|
||||
callback(response)
|
||||
|
Loading…
Reference in New Issue
Block a user