From add502d23697ff5c0664c2ffaae02e7b50fbd9bd Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 7 Nov 2021 20:18:33 +0400 Subject: [PATCH 1/2] Fix opds search and opds list of read books --- cps/db.py | 2 +- cps/web.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/db.py b/cps/db.py index 6ffc682f..06a42b8e 100644 --- a/cps/db.py +++ b/cps/db.py @@ -780,7 +780,7 @@ class CalibreDB(): # read search results from calibre-database and return it (function is used for feed and simple search def get_search_results(self, term, offset=None, order=None, limit=None, *join): - order = order[0] or [Books.sort] + order = order[0] if order else [Books.sort] pagination = None result = self.search_query(term, *join).order_by(*order).all() result_count = len(result) diff --git a/cps/web.py b/cps/web.py index 940897d3..94688e47 100644 --- a/cps/web.py +++ b/cps/web.py @@ -637,7 +637,7 @@ def render_language_books(page, name, order): def render_read_books(page, are_read, as_xml=False, order=None): - sort = order[0] or [] + sort = order[0] if order else [] if not config.config_read_column: if are_read: db_filter = and_(ub.ReadBook.user_id == int(current_user.id), @@ -1272,7 +1272,7 @@ def extend_search_term(searchterm, def render_adv_search_results(term, offset=None, order=None, limit=None): - sort = order[0] or [db.Books.sort] + sort = order[0] if order else [db.Books.sort] pagination = None cc = get_cc_columns(filter_config_custom_read=True) From 974549b1af7addc84b8012926f03188ec74b625d Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 8 Nov 2021 20:36:41 +0400 Subject: [PATCH 2/2] Removed technosoft2000 docker container --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index bfb4688d..666becdb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -31,7 +31,7 @@ If applicable, add screenshots to help explain your problem. - OS: [e.g. Windows 10/Raspberry Pi OS] - Python version: [e.g. python2.7] - Calibre-Web version: [e.g. 0.6.8 or 087c4c59 (git rev-parse --short HEAD)]: - - Docker container: [None/Technosoft2000/LinuxServer]: + - Docker container: [None/LinuxServer]: - Special Hardware: [e.g. Rasperry Pi Zero] - Browser: [e.g. Chrome 83.0.4103.97, Safari 13.3.7, Firefox 68.0.1 ESR]