mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Make author sorting on the device case insensitive
This commit is contained in:
parent
987b0a28ac
commit
8b85e25020
@ -8,6 +8,7 @@ import time
|
||||
|
||||
from calibre.utils.date import parse_date
|
||||
from calibre.devices.usbms.books import Book as Book_
|
||||
from calibre.ebooks.metadata import author_to_author_sort
|
||||
|
||||
class Book(Book_):
|
||||
|
||||
@ -20,6 +21,7 @@ class Book(Book_):
|
||||
self.authors = ['']
|
||||
else:
|
||||
self.authors = [authors]
|
||||
self.author_sort = author_to_author_sort(self.authors[0])
|
||||
|
||||
if not title:
|
||||
self.title = _('Unknown')
|
||||
|
@ -1193,7 +1193,10 @@ class DeviceBooksModel(BooksModel): # {{{
|
||||
ax = authors_to_string(self.db[x].authors)
|
||||
except:
|
||||
ax = ''
|
||||
return ax
|
||||
try:
|
||||
return sort_key(ax)
|
||||
except:
|
||||
return ax
|
||||
|
||||
keygen = {
|
||||
'title': ('title_sorter', lambda x: sort_key(x) if x else ''),
|
||||
|
Loading…
x
Reference in New Issue
Block a user