diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index d5ae345b..d342582f 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -285,22 +285,13 @@ class ProcessFanartThread(Thread): log.info("---===### Starting FanartSync ###===---") while not threadStopped(): # In the event the server goes offline - while threadSuspended(): + while threadSuspended() or window('plex_dbScan'): # Set in service.py if threadStopped(): # Abort was requested while waiting. We should exit log.info("---===### Stopped FanartSync ###===---") return 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 try: item = queue.get(block=False)