mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #802
This commit is contained in:
parent
7501dbbe65
commit
e49db6236b
@ -38,7 +38,7 @@ class MetaInformation(object):
|
|||||||
setattr(ans, attr, getattr(mi, attr))
|
setattr(ans, attr, getattr(mi, attr))
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, title, authors=['Unknown']):
|
def __init__(self, title, authors=[_('Unknown')]):
|
||||||
'''
|
'''
|
||||||
@param title: title or "Unknown" or a MetaInformation object
|
@param title: title or "Unknown" or a MetaInformation object
|
||||||
@param authors: List of strings or []
|
@param authors: List of strings or []
|
||||||
|
@ -511,6 +511,8 @@ class OPFCreator(MetaInformation):
|
|||||||
path = path[len(self.base_path)+1:]
|
path = path[len(self.base_path)+1:]
|
||||||
manifest.append((path, mt))
|
manifest.append((path, mt))
|
||||||
self.manifest = manifest
|
self.manifest = manifest
|
||||||
|
if not self.authors:
|
||||||
|
self.authors = [_('Unknown')]
|
||||||
|
|
||||||
def create_manifest(self, entries):
|
def create_manifest(self, entries):
|
||||||
'''
|
'''
|
||||||
|
@ -1427,6 +1427,8 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
|
|||||||
open(cpath, 'wb').write(cover)
|
open(cpath, 'wb').write(cover)
|
||||||
mi.cover = cname
|
mi.cover = cname
|
||||||
f = open(os.path.join(base, sanitize_file_name(name)+'.opf'), 'wb')
|
f = open(os.path.join(base, sanitize_file_name(name)+'.opf'), 'wb')
|
||||||
|
if not mi.authors:
|
||||||
|
mi.authors = [_('Unknown')]
|
||||||
mi.render(f)
|
mi.render(f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user