From bf465483657708891ab9164ad638a80c2c5632d9 Mon Sep 17 00:00:00 2001 From: Chuddah Date: Wed, 19 Feb 2020 23:23:21 +0000 Subject: [PATCH] Removed previous fixup. The recursive call to get_workers was implemented as it looked like the original intent of the DTHREADS variable. Otherwise this variable was redundant. The ThreadPool is a much better use of this setting. --- jellyfin_kodi/library.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jellyfin_kodi/library.py b/jellyfin_kodi/library.py index 5ca1bdd9..8d4a3f7b 100644 --- a/jellyfin_kodi/library.py +++ b/jellyfin_kodi/library.py @@ -138,8 +138,7 @@ class Library(threading.Thread): if not self.player.isPlayingVideo() or settings('syncDuringPlay.bool') or xbmc.getCondVisibility('VideoPlayer.Content(livetv)'): - while self.worker_downloads(): - pass + self.worker_downloads() self.worker_sort() self.worker_updates() @@ -225,7 +224,6 @@ class Library(threading.Thread): ''' 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)): if queue[0].qsize() and len(self.download_threads) < DTHREADS: @@ -233,8 +231,6 @@ class Library(threading.Thread): new_thread.start() LOG.info("-->[ q:download/%s ]", id(new_thread)) self.download_threads.append(new_thread) - added_threads = True - return added_threads def worker_sort(self):