mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Use waitForAbort instead of sleep
also waitForAbort is in seconds not ms
This commit is contained in:
parent
5ffa40faf5
commit
d0c7246de0
2 changed files with 7 additions and 3 deletions
|
@ -302,7 +302,7 @@ class WebSocketThread(threading.Thread):
|
||||||
self.client.run_forever()
|
self.client.run_forever()
|
||||||
if(self.keepRunning):
|
if(self.keepRunning):
|
||||||
self.logMsg("Client Needs To Restart")
|
self.logMsg("Client Needs To Restart")
|
||||||
if self.KodiMonitor.waitForAbort(10000):
|
if self.KodiMonitor.waitForAbort(5):
|
||||||
break
|
break
|
||||||
|
|
||||||
self.logMsg("Thread Exited")
|
self.logMsg("Thread Exited")
|
||||||
|
|
|
@ -68,7 +68,9 @@ class Service():
|
||||||
|
|
||||||
while not self.KodiMonitor.abortRequested():
|
while not self.KodiMonitor.abortRequested():
|
||||||
|
|
||||||
xbmc.sleep(1000)
|
if self.KodiMonitor.waitForAbort(1):
|
||||||
|
# Abort was requested while waiting. We should exit
|
||||||
|
break
|
||||||
|
|
||||||
if xbmc.Player().isPlaying():
|
if xbmc.Player().isPlaying():
|
||||||
try:
|
try:
|
||||||
|
@ -120,7 +122,9 @@ class Service():
|
||||||
if(libSync and countSync):
|
if(libSync and countSync):
|
||||||
startupComplete = True
|
startupComplete = True
|
||||||
else:
|
else:
|
||||||
xbmc.sleep(10000)
|
if self.KodiMonitor.waitForAbort(10):
|
||||||
|
# Abort was requested while waiting. We should exit
|
||||||
|
break
|
||||||
|
|
||||||
else:
|
else:
|
||||||
xbmc.log("Not authenticated yet")
|
xbmc.log("Not authenticated yet")
|
||||||
|
|
Loading…
Reference in a new issue