1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 12:30:00 +00:00

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

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)

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

View File

@ -29,11 +29,11 @@ SQLAlchemy-Utils>=0.33.5,<0.39.0
# metadata extraction
rarfile>=3.2
scholarly>=1.2.0,<1.7
scholarly>=1.2.0,<1.8
markdown2>=2.0.0,<2.5.0
html2text>=2020.1.16,<2022.1.1
python-dateutil>=2.1,<2.9.0
beautifulsoup4>=4.0.1,<4.11.0
beautifulsoup4>=4.0.1,<4.12.0
cchardet>=2.0.0,<2.2.0
# Comics
@ -41,4 +41,4 @@ natsort>=2.2.0,<8.2.0
comicapi>=2.2.0,<2.3.0
# Kobo integration
jsonschema>=3.2.0,<4.7.0
jsonschema>=3.2.0,<4.8.0

View File

@ -97,5 +97,5 @@ comics =
natsort>=2.2.0,<8.2.0
comicapi>=2.2.0,<2.3.0
kobo =
jsonschema>=3.2.0,<4.6.0
jsonschema>=3.2.0,<4.7.0

File diff suppressed because it is too large Load Diff