Much shorter download timeouts
This should hopefully solve the stuck library sync
This commit is contained in:
parent
100421ce2d
commit
e5e6f2208e
3 changed files with 8 additions and 2 deletions
|
@ -37,7 +37,7 @@ class DownloadUtils():
|
|||
|
||||
# Requests session
|
||||
s = None
|
||||
timeout = 30
|
||||
timeout = 3
|
||||
|
||||
def __init__(self):
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class image_cache_thread(threading.Thread):
|
|||
"http://%s:%s/image/image://%s"
|
||||
% (self.xbmc_host, self.xbmc_port, self.urlToProcess)),
|
||||
auth=(self.xbmc_username, self.xbmc_password),
|
||||
timeout=(35.1, 35.1))
|
||||
timeout=(0.1, 0.1))
|
||||
# We don't need the result
|
||||
except: pass
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import PlexFunctions
|
|||
###############################################################################
|
||||
|
||||
|
||||
@utils.logging
|
||||
@utils.ThreadMethodsAdditionalStop('emby_shouldStop')
|
||||
@utils.ThreadMethods
|
||||
class ThreadedGetMetadata(Thread):
|
||||
|
@ -64,6 +65,10 @@ class ThreadedGetMetadata(Thread):
|
|||
plexXML = PlexFunctions.GetPlexMetadata(updateItem['itemId'])
|
||||
if plexXML is None:
|
||||
# Did not receive a valid XML - skip that item for now
|
||||
self.logMsg("Could not get metadata for %s. "
|
||||
"Skipping that item for now", -1)
|
||||
with lock:
|
||||
getMetadataCount += 1
|
||||
queue.task_done()
|
||||
continue
|
||||
|
||||
|
@ -1105,6 +1110,7 @@ class LibrarySync(Thread):
|
|||
self.run_internal()
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('LibrarySync thread crashed', -1)
|
||||
# Library sync thread has crashed
|
||||
xbmcgui.Dialog().ok(
|
||||
heading=self.addonName,
|
||||
|
|
Loading…
Reference in a new issue