mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:54:28 +02:00
Fix #7071 (Download of metadata for multiple books has strange behaivour)
This commit is contained in:
parent
bd7e82b124
commit
fe6816282f
3 changed files with 8 additions and 4 deletions
|
|
@ -19,7 +19,6 @@
|
|||
from calibre.library.server.utils import strftime
|
||||
from calibre.utils.config import config_dir, prefs
|
||||
from calibre.utils.date import isoformat, now, parse_date
|
||||
from calibre.utils.localization import get_lang
|
||||
from calibre.utils.logging import Log
|
||||
from calibre.utils.zipfile import ZipFile
|
||||
|
||||
|
|
|
|||
|
|
@ -144,10 +144,10 @@ def _run(self):
|
|||
|
||||
def commit_covers(self, all=False):
|
||||
if all:
|
||||
self.worker.jobs.put(False)
|
||||
self.worker.jobs.put((False, False))
|
||||
while True:
|
||||
try:
|
||||
id, fmi, ok, cdata = self.worker.results.get(False)
|
||||
id, fmi, ok, cdata = self.worker.results.get_nowait()
|
||||
if ok:
|
||||
self.fetched_covers[id] = cdata
|
||||
self.results.put((id, 'cover', ok, fmi.title))
|
||||
|
|
@ -210,6 +210,12 @@ def do_one(self):
|
|||
pass
|
||||
if not self.downloader.is_alive():
|
||||
self.timer.stop()
|
||||
while True:
|
||||
try:
|
||||
r = self.downloader.results.get_nowait()
|
||||
self.handle_result(r)
|
||||
except Empty:
|
||||
break
|
||||
self.pd.accept()
|
||||
|
||||
def handle_result(self, r):
|
||||
|
|
|
|||
|
|
@ -1010,7 +1010,6 @@ def __call__(self, msg, step):
|
|||
'saved to', name)
|
||||
|
||||
def list_categories_option_parser():
|
||||
from calibre.library.check_library import CHECKS
|
||||
parser = get_parser(_('''\
|
||||
%prog list_categories [options]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue