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) updateItem = queue.get(block=False)
# Empty queue # Empty queue
except Queue.Empty: except Queue.Empty:
xbmc.sleep(100)
continue continue
# Download Metadata # Download Metadata
plexXML = PlexFunctions.GetPlexMetadata(updateItem['itemId']) plexXML = PlexFunctions.GetPlexMetadata(updateItem['itemId'])
@ -117,6 +118,7 @@ class ThreadedProcessMetadata(threading.Thread):
try: try:
updateItem = queue.get(block=False) updateItem = queue.get(block=False)
except Queue.Empty: except Queue.Empty:
xbmc.sleep(100)
continue continue
# Do the work; lock to be sure we've only got 1 Thread # Do the work; lock to be sure we've only got 1 Thread
plexitem = updateItem['XML'] plexitem = updateItem['XML']
@ -188,8 +190,9 @@ class ThreadedShowSyncInfo(threading.Thread):
try: try:
dialog.update( dialog.update(
percentage, percentage,
message="Downloaded: %s, Processed: %s" message="Downloaded: %s. Processed: %s: %s"
% (getMetadataProgress, processMetadataProgress)) % (getMetadataProgress, processMetadataProgress,
viewName))
except: except:
# Wierd formating of the string viewName?!? # Wierd formating of the string viewName?!?
pass pass