mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 02:13:47 +02:00
SONY driver: Fix problem caused by null titles
This commit is contained in:
parent
15e4cd48bc
commit
59d2b5fb68
1 changed files with 3 additions and 2 deletions
|
|
@ -415,10 +415,11 @@ def update_text_record(self, record, book, path, bl_index):
|
|||
prints('\tmtime', strftime(os.path.getmtime(path)))
|
||||
record.set('date', date)
|
||||
record.set('size', str(os.stat(path).st_size))
|
||||
record.set('title', book.title)
|
||||
title = book.title if book.title else _('Unknown')
|
||||
record.set('title', title)
|
||||
ts = book.title_sort
|
||||
if not ts:
|
||||
ts = title_sort(book.title)
|
||||
ts = title_sort(title)
|
||||
record.set('titleSorter', ts)
|
||||
record.set('author', authors_to_string(book.authors))
|
||||
ext = os.path.splitext(path)[1]
|
||||
|
|
|
|||
Loading…
Reference in a new issue