mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e773315f15
commit
ac895999a6
@ -100,7 +100,8 @@ def single_identify(title, authors, identifiers):
|
|||||||
log = GUILog()
|
log = GUILog()
|
||||||
results = identify(log, Event(), title=title, authors=authors,
|
results = identify(log, Event(), title=title, authors=authors,
|
||||||
identifiers=identifiers)
|
identifiers=identifiers)
|
||||||
return [metadata_to_opf(r) for r in results], dump_caches(), log.dump()
|
return [metadata_to_opf(r) for r in results], [r.has_cached_cover_url for
|
||||||
|
r in results], dump_caches(), log.dump()
|
||||||
|
|
||||||
def single_covers(title, authors, identifiers, caches):
|
def single_covers(title, authors, identifiers, caches):
|
||||||
load_caches(caches)
|
load_caches(caches)
|
||||||
|
@ -398,9 +398,11 @@ class IdentifyWorker(Thread): # {{{
|
|||||||
'calibre.ebooks.metadata.sources.worker',
|
'calibre.ebooks.metadata.sources.worker',
|
||||||
'single_identify', (self.title, self.authors,
|
'single_identify', (self.title, self.authors,
|
||||||
self.identifiers), no_output=True, abort=self.abort)
|
self.identifiers), no_output=True, abort=self.abort)
|
||||||
self.results, caches, log_dump = res['result']
|
self.results, covers, caches, log_dump = res['result']
|
||||||
self.results = [OPF(BytesIO(r), basedir=os.getcwdu(),
|
self.results = [OPF(BytesIO(r), basedir=os.getcwdu(),
|
||||||
populate_spine=False).to_book_metadata() for r in self.results]
|
populate_spine=False).to_book_metadata() for r in self.results]
|
||||||
|
for r, cov in zip(self.results, covers):
|
||||||
|
r.has_cached_cover_url = cov
|
||||||
self.caches.update(caches)
|
self.caches.update(caches)
|
||||||
self.log.load(log_dump)
|
self.log.load(log_dump)
|
||||||
for i, result in enumerate(self.results):
|
for i, result in enumerate(self.results):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user