mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 18:47:23 +00:00
parent
64b1b830d6
commit
7526b0dcb4
@ -1482,19 +1482,15 @@ def series_list():
|
||||
|
||||
|
||||
@app.route("/series/<int:book_id>/", defaults={'page': 1})
|
||||
@app.route("/series/<int:book_id>/<int:page>'")
|
||||
@app.route("/series/<int:book_id>/<int:page>")
|
||||
@login_required_if_no_ano
|
||||
def series(book_id, page):
|
||||
name = db.session.query(db.Series).filter(db.Series.id == book_id).first()
|
||||
if name:
|
||||
entries, random, pagination = fill_indexpage(page, db.Books, db.Books.series.any(db.Series.id == book_id),
|
||||
[db.Books.series_index])
|
||||
if entries:
|
||||
return render_title_template('index.html', random=random, pagination=pagination, entries=entries,
|
||||
return render_title_template('index.html', random=random, pagination=pagination, entries=entries,
|
||||
title=_(u"Series: %(serie)s", serie=name.name), page="series")
|
||||
else:
|
||||
flash(_(u"Error opening eBook. File does not exist or file is not accessible:"), category="error")
|
||||
return redirect(url_for("index"))
|
||||
else:
|
||||
abort(404)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user