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.utils.date import parse_date
|
||||||
from calibre.devices.usbms.books import Book as Book_
|
from calibre.devices.usbms.books import Book as Book_
|
||||||
|
from calibre.ebooks.metadata import author_to_author_sort
|
||||||
|
|
||||||
class Book(Book_):
|
class Book(Book_):
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ class Book(Book_):
|
|||||||
self.authors = ['']
|
self.authors = ['']
|
||||||
else:
|
else:
|
||||||
self.authors = [authors]
|
self.authors = [authors]
|
||||||
|
self.author_sort = author_to_author_sort(self.authors[0])
|
||||||
|
|
||||||
if not title:
|
if not title:
|
||||||
self.title = _('Unknown')
|
self.title = _('Unknown')
|
||||||
|
@ -1193,6 +1193,9 @@ class DeviceBooksModel(BooksModel): # {{{
|
|||||||
ax = authors_to_string(self.db[x].authors)
|
ax = authors_to_string(self.db[x].authors)
|
||||||
except:
|
except:
|
||||||
ax = ''
|
ax = ''
|
||||||
|
try:
|
||||||
|
return sort_key(ax)
|
||||||
|
except:
|
||||||
return ax
|
return ax
|
||||||
|
|
||||||
keygen = {
|
keygen = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user