Increase lib thread stability

This commit is contained in:
tomkat83 2016-02-10 09:14:31 +01:00
parent 9d50e8ef30
commit 9beac817fe

View file

@ -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