mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Implement sub-sorting
This commit is contained in:
parent
46f9ce9445
commit
16d268de60
@ -857,7 +857,10 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
|
|||||||
sort = field + ' ' + order
|
sort = field + ' ' + order
|
||||||
if field == 'series':
|
if field == 'series':
|
||||||
sort += ',series_index '+order
|
sort += ',series_index '+order
|
||||||
|
elif field == 'title':
|
||||||
|
sort += ',author_sort ' + order
|
||||||
|
else:
|
||||||
|
sort += ',title '+order
|
||||||
|
|
||||||
self.cache = self.conn.execute('SELECT * from meta ORDER BY '+sort).fetchall()
|
self.cache = self.conn.execute('SELECT * from meta ORDER BY '+sort).fetchall()
|
||||||
self.data = self.cache
|
self.data = self.cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user