mirror of
https://github.com/janeczku/calibre-web.git
synced 2024-11-26 08:51:05 +02:00
Fix for opds feed of unread/read books
This commit is contained in:
parent
544405f5aa
commit
c748716ad2
@ -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/<int:page>")
|
||||
@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)
|
||||
|
Loading…
Reference in New Issue
Block a user