mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
WebAPI showPosters fixed!
This commit is contained in:
parent
bd582d18d0
commit
0ae8b5429b
2 changed files with 9 additions and 5 deletions
|
@ -296,10 +296,11 @@ def filter_params(cmd, args, kwargs):
|
||||||
return curArgs, curKwargs
|
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"}
|
_help = {"desc": "No help message available. Please tell the devs that a help msg is missing for this cmd"}
|
||||||
|
|
||||||
def __init__(self, args, kwargs):
|
def __init__(self, args, kwargs):
|
||||||
|
|
||||||
# missing
|
# missing
|
||||||
try:
|
try:
|
||||||
if self._missing:
|
if self._missing:
|
||||||
|
@ -2103,7 +2104,7 @@ class CMD_ShowGetPoster(ApiCall):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
""" get the poster for a show in sickbeard """
|
""" 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):
|
class CMD_ShowGetBanner(ApiCall):
|
||||||
|
@ -2121,7 +2122,7 @@ class CMD_ShowGetBanner(ApiCall):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
""" get the banner for a show in sickbeard """
|
""" 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):
|
class CMD_ShowPause(ApiCall):
|
||||||
|
|
|
@ -223,8 +223,11 @@ class IndexHandler(RequestHandler):
|
||||||
response = yield gen.Task(self.getresponse, self._dispatch)
|
response = yield gen.Task(self.getresponse, self._dispatch)
|
||||||
self.finish(response)
|
self.finish(response)
|
||||||
|
|
||||||
|
@asynchronous
|
||||||
|
@gen.engine
|
||||||
def post(self, *args, **kwargs):
|
def post(self, *args, **kwargs):
|
||||||
return self._dispatch()
|
response = yield gen.Task(self.getresponse, self._dispatch)
|
||||||
|
self.finish(response)
|
||||||
|
|
||||||
def getresponse(self, func, callback):
|
def getresponse(self, func, callback):
|
||||||
response = func()
|
response = func()
|
||||||
|
|
Loading…
Reference in a new issue