mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
Update alert.py
This commit is contained in:
parent
a4abc0e223
commit
ccd3302f99
1 changed files with 2 additions and 5 deletions
|
@ -1,9 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import threading
|
||||
|
||||
import websocket
|
||||
|
||||
from plexapi import log
|
||||
|
||||
|
||||
|
@ -32,9 +30,8 @@ class AlertListener(threading.Thread):
|
|||
# create the websocket connection
|
||||
url = self._server.url(self.key).replace('http', 'ws')
|
||||
log.info('Starting AlertListener: %s', url)
|
||||
self._ws = websocket.WebSocketApp(url,
|
||||
on_message=self._onMessage,
|
||||
on_error=self._onError)
|
||||
self._ws = websocket.WebSocketApp(url, on_message=self._onMessage,
|
||||
on_error=self._onError)
|
||||
self._ws.run_forever()
|
||||
|
||||
def stop(self):
|
||||
|
|
Loading…
Reference in a new issue