mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cover cache: more fixes
This commit is contained in:
parent
e126ddc518
commit
a48395b9db
@ -176,6 +176,8 @@ class CoverCache(Thread): # {{{
|
|||||||
break
|
break
|
||||||
for id_ in ids:
|
for id_ in ids:
|
||||||
time.sleep(0.050) # Limit 20/second to not overwhelm the GUI
|
time.sleep(0.050) # Limit 20/second to not overwhelm the GUI
|
||||||
|
if not self.keep_running:
|
||||||
|
return
|
||||||
with self.lock:
|
with self.lock:
|
||||||
if id_ not in self.allowed_ids:
|
if id_ not in self.allowed_ids:
|
||||||
continue
|
continue
|
||||||
@ -218,8 +220,9 @@ class CoverCache(Thread): # {{{
|
|||||||
def refresh(self, ids):
|
def refresh(self, ids):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
for id_ in ids:
|
for id_ in ids:
|
||||||
self.cache.pop(id_, None)
|
cover = self.cache.pop(id_, None)
|
||||||
self.load_queue.put(id_)
|
if cover is not None:
|
||||||
|
self.load_queue.put(id_)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
### Global utility function for get_match here and in gui2/library.py
|
### Global utility function for get_match here and in gui2/library.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user