From baf61e14edbc9f7620ce1e1be637f8d81e1a0094 Mon Sep 17 00:00:00 2001 From: Krazybug Date: Tue, 1 Mar 2022 20:11:58 +0100 Subject: [PATCH] fix or --english flag --- calishot/ebooks_index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calishot/ebooks_index.py b/calishot/ebooks_index.py index 2f9b7f7..fc3914a 100644 --- a/calishot/ebooks_index.py +++ b/calishot/ebooks_index.py @@ -85,11 +85,12 @@ def build_index (dir='.', english=True): for db in dbs: for i, ebook in enumerate(db["ebooks"].rows): - if english and not ebook['language'] or ebook['language'] != "eng": + if english and (not ebook['language'] or ebook['language'] != "eng"): continue elif not english and ebook['language'] == "eng": continue + if ebook['authors']: ebook['authors']=formats=json.loads(ebook['authors']) # if ebook['series']: