From 9beac817fe2b0201be8fe964c0d0542d96e8de6d Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 10 Feb 2016 09:14:31 +0100 Subject: [PATCH] Increase lib thread stability --- resources/lib/librarysync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index f779784b..9d8814bc 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -60,6 +60,7 @@ class ThreadedGetMetadata(threading.Thread): updateItem = queue.get(block=False) # Empty queue except Queue.Empty: + xbmc.sleep(100) continue # Download Metadata plexXML = PlexFunctions.GetPlexMetadata(updateItem['itemId']) @@ -117,6 +118,7 @@ class ThreadedProcessMetadata(threading.Thread): try: updateItem = queue.get(block=False) except Queue.Empty: + xbmc.sleep(100) continue # Do the work; lock to be sure we've only got 1 Thread plexitem = updateItem['XML'] @@ -188,8 +190,9 @@ class ThreadedShowSyncInfo(threading.Thread): try: dialog.update( percentage, - message="Downloaded: %s, Processed: %s" - % (getMetadataProgress, processMetadataProgress)) + message="Downloaded: %s. Processed: %s: %s" + % (getMetadataProgress, processMetadataProgress, + viewName)) except: # Wierd formating of the string viewName?!? pass