mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug in calibre content server that would cause it to not work if yur library has books with blank author fields
This commit is contained in:
parent
241a2fc099
commit
6c31b9aea9
@ -337,7 +337,7 @@ class LibraryServer(object):
|
|||||||
|
|
||||||
book, books = MarkupTemplate(self.BOOK), []
|
book, books = MarkupTemplate(self.BOOK), []
|
||||||
for record in items[start:start+num]:
|
for record in items[start:start+num]:
|
||||||
aus = record[2] if record[2] else _('Unknown')
|
aus = record[2] if record[2] else __builtins__._('Unknown')
|
||||||
authors = '|'.join([i.replace('|', ',') for i in aus.split(',')])
|
authors = '|'.join([i.replace('|', ',') for i in aus.split(',')])
|
||||||
books.append(book.generate(r=record, authors=authors).render('xml').decode('utf-8'))
|
books.append(book.generate(r=record, authors=authors).render('xml').decode('utf-8'))
|
||||||
updated = self.db.last_modified()
|
updated = self.db.last_modified()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user