mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use new plugin based cover downloaders when checking for existing covers
This commit is contained in:
parent
9bd69f1437
commit
8039d980f2
@ -10,7 +10,7 @@ from calibre import prints
|
|||||||
from calibre.utils.config import OptionParser
|
from calibre.utils.config import OptionParser
|
||||||
from calibre.utils.logging import default_log
|
from calibre.utils.logging import default_log
|
||||||
from calibre.customize import Plugin
|
from calibre.customize import Plugin
|
||||||
from calibre.ebooks.metadata.library_thing import check_for_cover
|
from calibre.ebooks.metadata.covers import check_for_cover
|
||||||
|
|
||||||
metadata_config = None
|
metadata_config = None
|
||||||
|
|
||||||
@ -289,11 +289,10 @@ def filter_metadata_results(item):
|
|||||||
|
|
||||||
def do_cover_check(item):
|
def do_cover_check(item):
|
||||||
item.has_cover = False
|
item.has_cover = False
|
||||||
if item.isbn:
|
try:
|
||||||
try:
|
item.has_cover = check_for_cover(item)
|
||||||
item.has_cover = check_for_cover(item.isbn)
|
except:
|
||||||
except:
|
pass # Cover not found
|
||||||
pass # Cover not found
|
|
||||||
|
|
||||||
def check_for_covers(items):
|
def check_for_covers(items):
|
||||||
threads = [Thread(target=do_cover_check, args=(item,)) for item in items]
|
threads = [Thread(target=do_cover_check, args=(item,)) for item in items]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user