mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-25 17:40:31 +00:00
Merge branch 'master' into Develop
This commit is contained in:
commit
f0a5225524
@ -692,6 +692,10 @@ class CalibreDB():
|
|||||||
query = self.session.query(database)
|
query = self.session.query(database)
|
||||||
if len(join) == 6:
|
if len(join) == 6:
|
||||||
query = query.outerjoin(join[0], join[1]).outerjoin(join[2]).outerjoin(join[3], join[4]).outerjoin(join[5])
|
query = query.outerjoin(join[0], join[1]).outerjoin(join[2]).outerjoin(join[3], join[4]).outerjoin(join[5])
|
||||||
|
if len(join) == 5:
|
||||||
|
query = query.outerjoin(join[0], join[1]).outerjoin(join[2]).outerjoin(join[3], join[4])
|
||||||
|
if len(join) == 4:
|
||||||
|
query = query.outerjoin(join[0], join[1]).outerjoin(join[2]).outerjoin(join[3])
|
||||||
if len(join) == 3:
|
if len(join) == 3:
|
||||||
query = query.outerjoin(join[0], join[1]).outerjoin(join[2])
|
query = query.outerjoin(join[0], join[1]).outerjoin(join[2])
|
||||||
elif len(join) == 2:
|
elif len(join) == 2:
|
||||||
|
12
cps/web.py
12
cps/web.py
@ -423,7 +423,11 @@ def render_rated_books(page, book_id, order):
|
|||||||
entries, random, pagination = calibre_db.fill_indexpage(page, 0,
|
entries, random, pagination = calibre_db.fill_indexpage(page, 0,
|
||||||
db.Books,
|
db.Books,
|
||||||
db.Books.ratings.any(db.Ratings.rating > 9),
|
db.Books.ratings.any(db.Ratings.rating > 9),
|
||||||
order)
|
order,
|
||||||
|
db.books_series_link,
|
||||||
|
db.Books.id == db.books_series_link.c.book,
|
||||||
|
db.Series)
|
||||||
|
|
||||||
return render_title_template('index.html', random=random, entries=entries, pagination=pagination,
|
return render_title_template('index.html', random=random, entries=entries, pagination=pagination,
|
||||||
id=book_id, title=_(u"Top Rated Books"), page="rated")
|
id=book_id, title=_(u"Top Rated Books"), page="rated")
|
||||||
else:
|
else:
|
||||||
@ -629,6 +633,9 @@ def render_read_books(page, are_read, as_xml=False, order=None):
|
|||||||
db.Books,
|
db.Books,
|
||||||
db_filter,
|
db_filter,
|
||||||
order,
|
order,
|
||||||
|
db.books_series_link,
|
||||||
|
db.Books.id == db.books_series_link.c.book,
|
||||||
|
db.Series,
|
||||||
ub.ReadBook, db.Books.id == ub.ReadBook.book_id)
|
ub.ReadBook, db.Books.id == ub.ReadBook.book_id)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
@ -640,6 +647,9 @@ def render_read_books(page, are_read, as_xml=False, order=None):
|
|||||||
db.Books,
|
db.Books,
|
||||||
db_filter,
|
db_filter,
|
||||||
order,
|
order,
|
||||||
|
db.books_series_link,
|
||||||
|
db.Books.id == db.books_series_link.c.book,
|
||||||
|
db.Series,
|
||||||
db.cc_classes[config.config_read_column])
|
db.cc_classes[config.config_read_column])
|
||||||
except (KeyError, AttributeError):
|
except (KeyError, AttributeError):
|
||||||
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
|
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
|
||||||
|
Loading…
Reference in New Issue
Block a user