Bugfix search with wrong custom column configured

This commit is contained in:
Ozzie Isaacs
2022-07-23 07:23:13 +02:00
parent a72f16fd3a
commit a3f7dc2a5a
5 changed files with 205 additions and 639 deletions
+2
View File
@@ -49,6 +49,8 @@ class scholar(Metadata):
tokens = [quote(t.encode("utf-8")) for t in title_tokens]
query = " ".join(tokens)
try:
scholarly.set_timeout(20)
scholarly.set_retries(2)
scholar_gen = itertools.islice(scholarly.search_pubs(query), 10)
except Exception as e:
log.warning(e)
+3
View File
@@ -134,6 +134,9 @@ def adv_search_read_status(read_status):
db_filter = coalesce(db.cc_classes[config.config_read_column].value, False) != True
except (KeyError, AttributeError, IndexError):
log.error("Custom Column No.{} does not exist in calibre database".format(config.config_read_column))
flash(_("Custom Column No.%(column)d does not exist in calibre database",
column=config.config_read_column),
category="error")
return true()
return db_filter