mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Metadata download: If any results have a published date, ensure they all do
This commit is contained in:
parent
2bdfa64c74
commit
d54f2b6d14
@ -357,6 +357,16 @@ def search(title=None, author=None, publisher=None, isbn=None, isbndb_key=None,
|
||||
if title.lower() == r.title[:len(title)].lower() and r.comments and len(r.comments):
|
||||
results[0].comments = r.comments
|
||||
break
|
||||
# Find a pubdate
|
||||
pubdate = None
|
||||
for r in results:
|
||||
if r.pubdate is not None:
|
||||
pubdate = r.pubdate
|
||||
break
|
||||
if pubdate is not None:
|
||||
for r in results:
|
||||
if r.pubdate is None:
|
||||
r.pubdate = pubdate
|
||||
|
||||
# for r in results:
|
||||
# print "{0:14.14} {1:30.30} {2:20.20} {3:6} {4}".format(r.isbn, r.title, r.publisher, len(r.comments if r.comments else ''), r.has_cover)
|
||||
|
Loading…
x
Reference in New Issue
Block a user