Use new plugin based cover downloaders when checking for existing covers

This commit is contained in:
Kovid Goyal 2010-08-01 10:16:39 -06:00
parent 9bd69f1437
commit 8039d980f2

View File

@ -10,7 +10,7 @@ from calibre import prints
from calibre.utils.config import OptionParser
from calibre.utils.logging import default_log
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
@ -289,11 +289,10 @@ def filter_metadata_results(item):
def do_cover_check(item):
item.has_cover = False
if item.isbn:
try:
item.has_cover = check_for_cover(item.isbn)
except:
pass # Cover not found
try:
item.has_cover = check_for_cover(item)
except:
pass # Cover not found
def check_for_covers(items):
threads = [Thread(target=do_cover_check, args=(item,)) for item in items]