mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
ISBNDB metadata plugin: Return results even though they have no comments
This commit is contained in:
parent
00a96db7a5
commit
2b293865c3
@ -154,10 +154,11 @@ class ISBNDB(Source):
|
|||||||
total_results = int(bl.get('total_results'))
|
total_results = int(bl.get('total_results'))
|
||||||
shown_results = int(bl.get('shown_results'))
|
shown_results = int(bl.get('shown_results'))
|
||||||
for bd in bl.xpath('.//BookData'):
|
for bd in bl.xpath('.//BookData'):
|
||||||
isbn = check_isbn(bd.get('isbn13', bd.get('isbn', None)))
|
isbn = check_isbn(bd.get('isbn', None))
|
||||||
if not isbn:
|
isbn13 = check_isbn(bd.get('isbn13', None))
|
||||||
|
if not isbn and not isbn13:
|
||||||
continue
|
continue
|
||||||
if orig_isbn and isbn != orig_isbn:
|
if orig_isbn and orig_isbn not in {isbn, isbn13}:
|
||||||
continue
|
continue
|
||||||
title = tostring(bd.find('Title'))
|
title = tostring(bd.find('Title'))
|
||||||
if not title:
|
if not title:
|
||||||
@ -173,10 +174,6 @@ class ISBNDB(Source):
|
|||||||
if not authors:
|
if not authors:
|
||||||
continue
|
continue
|
||||||
comments = tostring(bd.find('Summary'))
|
comments = tostring(bd.find('Summary'))
|
||||||
if not comments:
|
|
||||||
# Require comments, since without them the result is useless
|
|
||||||
# anyway
|
|
||||||
continue
|
|
||||||
id_ = (title, tuple(authors))
|
id_ = (title, tuple(authors))
|
||||||
if id_ in seen:
|
if id_ in seen:
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user