mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Prevent metadata download from returning published dates earlier than 101 A.D.
This commit is contained in:
parent
b461b58e8c
commit
d66fd24888
@ -22,6 +22,7 @@ from calibre.ebooks.metadata.book.base import Metadata
|
|||||||
from calibre.utils.date import utc_tz, as_utc
|
from calibre.utils.date import utc_tz, as_utc
|
||||||
from calibre.utils.html2text import html2text
|
from calibre.utils.html2text import html2text
|
||||||
from calibre.utils.icu import lower
|
from calibre.utils.icu import lower
|
||||||
|
from calibre.utils.date import UNDEFINED_DATE
|
||||||
|
|
||||||
# Download worker {{{
|
# Download worker {{{
|
||||||
class Worker(Thread):
|
class Worker(Thread):
|
||||||
@ -490,6 +491,8 @@ def identify(log, abort, # {{{
|
|||||||
max_tags = msprefs['max_tags']
|
max_tags = msprefs['max_tags']
|
||||||
for r in results:
|
for r in results:
|
||||||
r.tags = r.tags[:max_tags]
|
r.tags = r.tags[:max_tags]
|
||||||
|
if getattr(r.pubdate, 'year', 2000) <= UNDEFINED_DATE.year:
|
||||||
|
r.pubdate = None
|
||||||
|
|
||||||
if msprefs['swap_author_names']:
|
if msprefs['swap_author_names']:
|
||||||
for r in results:
|
for r in results:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user