mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Mobile page breaks if library contains empty books. Now fixed.
This commit is contained in:
parent
3a6fb23646
commit
6b59d8aa96
@ -1410,7 +1410,6 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
else:
|
else:
|
||||||
#if verbose: print "generating new thumbnail for %s" % title['title']
|
#if verbose: print "generating new thumbnail for %s" % title['title']
|
||||||
self.generateThumbnail(title, image_dir, thumb_file)
|
self.generateThumbnail(title, image_dir, thumb_file)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Use default cover
|
# Use default cover
|
||||||
if self.verbose: print "no cover available for %s, will use default" % \
|
if self.verbose: print "no cover available for %s, will use default" % \
|
||||||
|
@ -714,6 +714,10 @@ class LibraryServer(object):
|
|||||||
|
|
||||||
book, books = MarkupTemplate(self.MOBILE_BOOK), []
|
book, books = MarkupTemplate(self.MOBILE_BOOK), []
|
||||||
for record in items[(start-1):(start-1)+num]:
|
for record in items[(start-1):(start-1)+num]:
|
||||||
|
if record[13] is None:
|
||||||
|
record[13] = ''
|
||||||
|
if record[6] is None:
|
||||||
|
record[6] = 0
|
||||||
aus = record[2] if record[2] else __builtin__._('Unknown')
|
aus = record[2] if record[2] else __builtin__._('Unknown')
|
||||||
authors = '|'.join([i.replace('|', ',') for i in aus.split(',')])
|
authors = '|'.join([i.replace('|', ',') for i in aus.split(',')])
|
||||||
record[10] = fmt_sidx(float(record[10]))
|
record[10] = fmt_sidx(float(record[10]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user