mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-01 05:46:13 +00:00
Dont modify a list as you are traversing it. The result is
implementation dependant although with CPython elements are unintentionally skipped during iteration. Basic CPython example: >>> A = [1,2,3,4,5,6] >>> for a in A: ... A.remove(a) >>> A [2, 4, 6]
This commit is contained in:
parent
94456ddcd8
commit
85d4e660ef
2 changed files with 5 additions and 8 deletions
|
@ -147,9 +147,7 @@ class Artwork(object):
|
|||
|
||||
def add_worker(self):
|
||||
|
||||
for thread in self.threads:
|
||||
if thread.is_done:
|
||||
self.threads.remove(thread)
|
||||
self.threads = [thread for thread in self.threads if not thread.is_done]
|
||||
|
||||
if self.queue.qsize() and len(self.threads) < 2:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue