mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Keep adding threads until the user limit has been reached
This commit is contained in:
parent
b878a0e433
commit
4649d2371f
1 changed files with 5 additions and 1 deletions
|
@ -139,7 +139,8 @@ class Library(threading.Thread):
|
||||||
|
|
||||||
if not self.player.isPlayingVideo() or settings('syncDuringPlay.bool') or xbmc.getCondVisibility('VideoPlayer.Content(livetv)'):
|
if not self.player.isPlayingVideo() or settings('syncDuringPlay.bool') or xbmc.getCondVisibility('VideoPlayer.Content(livetv)'):
|
||||||
|
|
||||||
self.worker_downloads()
|
while self.worker_downloads():
|
||||||
|
pass
|
||||||
self.worker_sort()
|
self.worker_sort()
|
||||||
|
|
||||||
self.worker_updates()
|
self.worker_updates()
|
||||||
|
@ -225,6 +226,7 @@ class Library(threading.Thread):
|
||||||
|
|
||||||
''' Get items from jellyfin and place them in the appropriate queues.
|
''' Get items from jellyfin and place them in the appropriate queues.
|
||||||
'''
|
'''
|
||||||
|
added_threads = False
|
||||||
for queue in ((self.updated_queue, self.updated_output), (self.userdata_queue, self.userdata_output)):
|
for queue in ((self.updated_queue, self.updated_output), (self.userdata_queue, self.userdata_output)):
|
||||||
if queue[0].qsize() and len(self.download_threads) < DTHREADS:
|
if queue[0].qsize() and len(self.download_threads) < DTHREADS:
|
||||||
|
|
||||||
|
@ -232,6 +234,8 @@ class Library(threading.Thread):
|
||||||
new_thread.start()
|
new_thread.start()
|
||||||
LOG.info("-->[ q:download/%s ]", id(new_thread))
|
LOG.info("-->[ q:download/%s ]", id(new_thread))
|
||||||
self.download_threads.append(new_thread)
|
self.download_threads.append(new_thread)
|
||||||
|
added_threads = True
|
||||||
|
return added_threads
|
||||||
|
|
||||||
def worker_sort(self):
|
def worker_sort(self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue