mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix Kodi hangup on exit
This commit is contained in:
parent
0e30a28dcb
commit
c9d51690df
1 changed files with 11 additions and 4 deletions
|
@ -21,8 +21,6 @@ class WebService(threading.Thread):
|
|||
|
||||
''' Run a webservice to trigger playback.
|
||||
'''
|
||||
stop_thread = False
|
||||
|
||||
def __init__(self):
|
||||
threading.Thread.__init__(self)
|
||||
|
||||
|
@ -34,7 +32,6 @@ class WebService(threading.Thread):
|
|||
conn = httplib.HTTPConnection("127.0.0.1:%d" % PORT)
|
||||
conn.request("QUIT", "/")
|
||||
conn.getresponse()
|
||||
self.stop_thread = True
|
||||
except Exception as error:
|
||||
pass
|
||||
|
||||
|
@ -71,7 +68,9 @@ class HttpServer(BaseHTTPServer.HTTPServer):
|
|||
|
||||
class requestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
|
||||
#Handler for the GET requests
|
||||
''' Http request handler. Do not use LOG here,
|
||||
it will hang requests in Kodi > show information dialog.
|
||||
'''
|
||||
|
||||
def log_message(self, format, *args):
|
||||
|
||||
|
@ -79,6 +78,14 @@ class requestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
'''
|
||||
pass
|
||||
|
||||
def do_QUIT(self):
|
||||
|
||||
''' send 200 OK response, and set server.stop to True
|
||||
'''
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.server.stop = True
|
||||
|
||||
def get_params(self):
|
||||
|
||||
''' Get the params
|
||||
|
|
Loading…
Reference in a new issue