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:
Kovid Goyal 2009-04-21 15:03:14 -07:00
parent 241a2fc099
commit 6c31b9aea9

View File

@ -337,7 +337,7 @@ class LibraryServer(object):
book, books = MarkupTemplate(self.BOOK), []
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(',')])
books.append(book.generate(r=record, authors=authors).render('xml').decode('utf-8'))
updated = self.db.last_modified()