Merge while loops
This commit is contained in:
parent
8743ce13af
commit
daf23fcc55
1 changed files with 1 additions and 10 deletions
|
@ -285,22 +285,13 @@ class ProcessFanartThread(Thread):
|
||||||
log.info("---===### Starting FanartSync ###===---")
|
log.info("---===### Starting FanartSync ###===---")
|
||||||
while not threadStopped():
|
while not threadStopped():
|
||||||
# In the event the server goes offline
|
# In the event the server goes offline
|
||||||
while threadSuspended():
|
while threadSuspended() or window('plex_dbScan'):
|
||||||
# Set in service.py
|
# Set in service.py
|
||||||
if threadStopped():
|
if threadStopped():
|
||||||
# Abort was requested while waiting. We should exit
|
# Abort was requested while waiting. We should exit
|
||||||
log.info("---===### Stopped FanartSync ###===---")
|
log.info("---===### Stopped FanartSync ###===---")
|
||||||
return
|
return
|
||||||
xbmc.sleep(1000)
|
xbmc.sleep(1000)
|
||||||
while window('plex_dbScan'):
|
|
||||||
# Don't do background sync if there is another sync
|
|
||||||
# going - otherwise we will have OperationalError for
|
|
||||||
# Kodi DB changes!
|
|
||||||
if threadStopped():
|
|
||||||
# Abort was requested while waiting. We should exit
|
|
||||||
log.info("---===### Stopped FanartSync ###===---")
|
|
||||||
return
|
|
||||||
xbmc.sleep(1000)
|
|
||||||
# grabs Plex item from queue
|
# grabs Plex item from queue
|
||||||
try:
|
try:
|
||||||
item = queue.get(block=False)
|
item = queue.get(block=False)
|
||||||
|
|
Loading…
Reference in a new issue