mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
SONY driver: Fix problem caused by null titles
This commit is contained in:
parent
15e4cd48bc
commit
59d2b5fb68
@ -415,10 +415,11 @@ class XMLCache(object):
|
|||||||
prints('\tmtime', strftime(os.path.getmtime(path)))
|
prints('\tmtime', strftime(os.path.getmtime(path)))
|
||||||
record.set('date', date)
|
record.set('date', date)
|
||||||
record.set('size', str(os.stat(path).st_size))
|
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
|
ts = book.title_sort
|
||||||
if not ts:
|
if not ts:
|
||||||
ts = title_sort(book.title)
|
ts = title_sort(title)
|
||||||
record.set('titleSorter', ts)
|
record.set('titleSorter', ts)
|
||||||
record.set('author', authors_to_string(book.authors))
|
record.set('author', authors_to_string(book.authors))
|
||||||
ext = os.path.splitext(path)[1]
|
ext = os.path.splitext(path)[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user