mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7071 (Download of metadata for multiple books has strange behaivour)
This commit is contained in:
parent
bd7e82b124
commit
fe6816282f
@ -19,7 +19,6 @@ from calibre.ebooks.metadata.epub import set_metadata
|
||||
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 @@ class DownloadMetadata(Thread):
|
||||
|
||||
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 @@ class DoDownload(QObject):
|
||||
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 command_restore_database(args, dbpath):
|
||||
'saved to', name)
|
||||
|
||||
def list_categories_option_parser():
|
||||
from calibre.library.check_library import CHECKS
|
||||
parser = get_parser(_('''\
|
||||
%prog list_categories [options]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user