Cover cache: more fixes

This commit is contained in:
Kovid Goyal 2010-12-08 11:28:10 -07:00
parent e126ddc518
commit a48395b9db

View File

@ -176,6 +176,8 @@ class CoverCache(Thread): # {{{
break
for id_ in ids:
time.sleep(0.050) # Limit 20/second to not overwhelm the GUI
if not self.keep_running:
return
with self.lock:
if id_ not in self.allowed_ids:
continue
@ -218,7 +220,8 @@ class CoverCache(Thread): # {{{
def refresh(self, ids):
with self.lock:
for id_ in ids:
self.cache.pop(id_, None)
cover = self.cache.pop(id_, None)
if cover is not None:
self.load_queue.put(id_)
# }}}