diff --git a/cps/opds.py b/cps/opds.py index c66ee836..e8d3fad9 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -94,7 +94,7 @@ def feed_cc_search(query): @opds.route("/opds/search", methods=["GET"]) @requires_basic_auth_if_no_ano def feed_normal_search(): - return feed_search(request.args.get("query").strip()) + return feed_search(request.args.get("query", "").strip()) @opds.route("/opds/new") diff --git a/cps/templates/feed.xml b/cps/templates/feed.xml index 4b65b1ca..4ad1db8c 100644 --- a/cps/templates/feed.xml +++ b/cps/templates/feed.xml @@ -11,18 +11,18 @@ -{% if pagination.has_prev %} +{% if pagination and pagination.has_prev %} {% endif %} -{% if pagination.has_next %} +{% if pagination and pagination.has_next %} {% endif %} -{% if pagination.has_prev %} +{% if pagination and pagination.has_prev %} @@ -30,7 +30,7 @@ - + {{instance}} {{instance}} diff --git a/cps/templates/index.xml b/cps/templates/index.xml index 6a69d732..c6a6e8f0 100644 --- a/cps/templates/index.xml +++ b/cps/templates/index.xml @@ -8,6 +8,7 @@ + {{instance}} {{instance}}