mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
add some checking arround starting a new thread, it looks like some systems are slow to release resources and need some time so give them that time.
This commit is contained in:
parent
631e6d5f13
commit
23522ac75e
1 changed files with 17 additions and 4 deletions
|
@ -251,12 +251,25 @@ class Artwork(object):
|
||||||
new_thread.set_host(self.xbmc_host, self.xbmc_port)
|
new_thread.set_host(self.xbmc_host, self.xbmc_port)
|
||||||
new_thread.set_auth(self.xbmc_username, self.xbmc_password)
|
new_thread.set_auth(self.xbmc_username, self.xbmc_password)
|
||||||
|
|
||||||
|
counter = 0
|
||||||
|
worked = False
|
||||||
|
while counter < 10:
|
||||||
|
try:
|
||||||
new_thread.start()
|
new_thread.start()
|
||||||
|
worked = True
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
counter = counter + 1
|
||||||
|
xbmc.sleep(1000)
|
||||||
|
|
||||||
|
if(worked):
|
||||||
self.image_cache_threads.append(new_thread)
|
self.image_cache_threads.append(new_thread)
|
||||||
return
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
log.info("Waiting for empty queue spot: %s", len(self.image_cache_threads))
|
log.info("Waiting for empty queue spot: %s", len(self.image_cache_threads))
|
||||||
xbmc.sleep(50)
|
xbmc.sleep(100)
|
||||||
|
|
||||||
def cache_texture(self, url):
|
def cache_texture(self, url):
|
||||||
# Cache a single image url to the texture cache
|
# Cache a single image url to the texture cache
|
||||||
|
|
Loading…
Reference in a new issue