mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Quiet webservice
This commit is contained in:
parent
ae51eabb41
commit
d555079221
1 changed files with 12 additions and 2 deletions
|
@ -111,6 +111,12 @@ class StoppableHttpRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def log_message(self, format, *args):
|
||||||
|
|
||||||
|
''' Mute the webservice requests.
|
||||||
|
'''
|
||||||
|
pass
|
||||||
|
|
||||||
def do_QUIT(self):
|
def do_QUIT(self):
|
||||||
|
|
||||||
''' send 200 OK response, and set server.stop to True
|
''' send 200 OK response, and set server.stop to True
|
||||||
|
@ -159,18 +165,22 @@ class StoppableHttpRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
try:
|
try:
|
||||||
params = self.get_params()
|
params = self.get_params()
|
||||||
LOG.info("Webservice called with params: %s", params)
|
LOG.info("Webservice called with params: %s", params)
|
||||||
|
|
||||||
path = ("plugin://plugin.video.emby?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
|
path = ("plugin://plugin.video.emby?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
|
||||||
% (params.get('Id'), params.get('KodiId'), params.get('Name'), params.get('transcode') or False))
|
% (params.get('Id'), params.get('KodiId'), params.get('Name'), params.get('transcode') or False))
|
||||||
|
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
self.send_header('Content-type', 'text/html')
|
self.send_header('Content-type', 'text/html')
|
||||||
self.send_header('Content-Length', len(path))
|
self.send_header('Content-Length', len(path))
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
self.wfile.write(path)
|
|
||||||
|
if not headers_only:
|
||||||
|
self.wfile.write(path)
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
|
|
||||||
LOG.exception(error)
|
LOG.exception(error)
|
||||||
self.send_error(500, 'Exception occurred: %s' % error)
|
self.send_error(500, "Exception occurred: %s" % error)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue