Current sorting order visible in all sidebar selectors, and search results

Sorting "hot" books only ascending and descending according to download numbers
Downloaded books sorting according to authors name working
This commit is contained in:
Ozzieisaacs
2021-11-04 20:51:48 +04:00
parent 58379159fb
commit c1f4ca36b6
5 changed files with 91 additions and 63 deletions
+1 -1
View File
@@ -780,7 +780,7 @@ class CalibreDB():
# read search results from calibre-database and return it (function is used for feed and simple search
def get_search_results(self, term, offset=None, order=None, limit=None, *join):
order = order or [Books.sort]
order = order[0] or [Books.sort]
pagination = None
result = self.search_query(term, *join).order_by(*order).all()
result_count = len(result)