From c748716ad2354dfcfa30ad8da30eb136756b037e Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Fri, 19 Apr 2019 12:07:46 +0200 Subject: [PATCH] Fix for opds feed of unread/read books --- cps/web.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cps/web.py b/cps/web.py index eaf39527..095020af 100644 --- a/cps/web.py +++ b/cps/web.py @@ -724,6 +724,7 @@ def before_request(): # Routing functions +@app.route("/opds/") @app.route("/opds") @requires_basic_auth_if_no_ano def feed_index(): @@ -2123,12 +2124,16 @@ def render_read_books(page, are_read, as_xml=False): @app.route("/opds/readbooks/") -@login_required_if_no_ano +@requires_basic_auth_if_no_ano def feed_read_books(): off = request.args.get("offset") or 0 return render_read_books(int(off) / (int(config.config_books_per_page)) + 1, True, True) +@app.route("/favicon.ico") +def favicon(): + return send_from_directory(os.path.join(os.path.dirname(__file__), "static"), "favicon.ico") + @app.route("/readbooks/", defaults={'page': 1}) @app.route("/readbooks/") @login_required_if_no_ano @@ -2137,7 +2142,7 @@ def read_books(page): @app.route("/opds/unreadbooks/") -@login_required_if_no_ano +@requires_basic_auth_if_no_ano def feed_unread_books(): off = request.args.get("offset") or 0 return render_read_books(int(off) / (int(config.config_books_per_page)) + 1, False, True)