mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Apply suggestions from code review
This commit is contained in:
parent
f6eeb49bd1
commit
1462e07fa5
4 changed files with 8 additions and 4 deletions
|
@ -35,7 +35,9 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
|
||||||
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
|
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def set_options(self, options=None):
|
def set_options(self, options=None):
|
||||||
self._options = [] if options is None else options
|
self._options = options
|
||||||
|
if options is None:
|
||||||
|
self._options = []
|
||||||
|
|
||||||
def is_selected(self):
|
def is_selected(self):
|
||||||
return bool(self.selected_option)
|
return bool(self.selected_option)
|
||||||
|
|
|
@ -267,7 +267,7 @@ def browse(media, view_id=None, folder=None, server_id=None, api_client=None):
|
||||||
|
|
||||||
monitor = xbmc.Monitor()
|
monitor = xbmc.Monitor()
|
||||||
|
|
||||||
for _ in range(300):
|
for _i in range(300):
|
||||||
if window('jellyfin_online.bool'):
|
if window('jellyfin_online.bool'):
|
||||||
break
|
break
|
||||||
elif monitor.waitForAbort(0.1):
|
elif monitor.waitForAbort(0.1):
|
||||||
|
|
|
@ -51,7 +51,9 @@ class LogHandler(logging.StreamHandler):
|
||||||
|
|
||||||
self.mask_info = settings('maskInfo.bool')
|
self.mask_info = settings('maskInfo.bool')
|
||||||
|
|
||||||
self.level = xbmc.LOGINFO if kodi_version() > 18 else xbmc.LOGNOTICE
|
self.level = xbmc.LOGNOTICE
|
||||||
|
if kodi_version() > 18:
|
||||||
|
self.level = xbmc.LOGINFO
|
||||||
|
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ class WSClient(threading.Thread):
|
||||||
|
|
||||||
self.wsc.run_forever(ping_interval=10)
|
self.wsc.run_forever(ping_interval=10)
|
||||||
|
|
||||||
if monitor.waitForAbort(5):
|
if not self.stop and monitor.waitForAbort(5):
|
||||||
break
|
break
|
||||||
|
|
||||||
LOG.info("---<[ websocket ]")
|
LOG.info("---<[ websocket ]")
|
||||||
|
|
Loading…
Reference in a new issue