diff --git a/cps/editbooks.py b/cps/editbooks.py
index 54f023cc..169619ff 100755
--- a/cps/editbooks.py
+++ b/cps/editbooks.py
@@ -1227,7 +1227,7 @@ def upload_single_file(file_request, book, book_id):
return uploader.process(
saved_filename, *os.path.splitext(requested_file.filename),
- rarExecutable=config.config_rarfile_location)
+ rar_executable=config.config_rarfile_location)
return None
diff --git a/cps/templates/grid.html b/cps/templates/grid.html
index 1905d52d..3fa6958f 100644
--- a/cps/templates/grid.html
+++ b/cps/templates/grid.html
@@ -28,7 +28,7 @@
- {{ image.series(entry[0].series[0], alt=entry[0].series[0].name|shortentitle) }}
+ {{ image.book_cover(entry[0])}}
{{entry.count}}
diff --git a/cps/web.py b/cps/web.py
index bd2b4b91..211acb19 100755
--- a/cps/web.py
+++ b/cps/web.py
@@ -1002,13 +1002,21 @@ def series_list():
if no_series_count:
entries.append([db.Category(_("None"), "-1"), no_series_count])
entries = sorted(entries, key=lambda x: x[0].name.lower(), reverse=not order_no)
- return render_title_template('list.html', entries=entries, folder='web.books_list', charlist=char_list,
- title=_("Series"), page="serieslist", data="series", order=order_no)
+ return render_title_template('list.html',
+ entries=entries,
+ folder='web.books_list',
+ charlist=char_list,
+ title=_("Series"),
+ page="serieslist",
+ data="series", order=order_no)
else:
- entries = calibre_db.session.query(db.Books, func.count('books_series_link').label('count'),
- func.max(db.Books.series_index), db.Books.id) \
- .join(db.books_series_link).join(db.Series).filter(calibre_db.common_filters()) \
- .group_by(text('books_series_link.series')).order_by(order).all()
+ entries = (calibre_db.session.query(db.Books, func.count('books_series_link').label('count'),
+ func.max(db.Books.series_index), db.Books.id)
+ .join(db.books_series_link).join(db.Series).filter(calibre_db.common_filters())
+ .group_by(text('books_series_link.series'))
+ .having(func.max(db.Books.series_index))
+ .order_by(order)
+ .all())
return render_title_template('grid.html', entries=entries, folder='web.books_list', charlist=char_list,
title=_("Series"), page="serieslist", data="series", bodyClass="grid-view",
order=order_no)