mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
46adfef099
2 changed files with 9 additions and 5 deletions
|
@ -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 a new issue