mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-02 21:16:02 +01:00
Fix #802
This commit is contained in:
parent
7501dbbe65
commit
e49db6236b
3 changed files with 5 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ def copy(mi):
|
|||
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 authors: List of strings or []
|
||||
|
|
|
|||
|
|
@ -511,6 +511,8 @@ def __init__(self, base_path, *args, **kwargs):
|
|||
path = path[len(self.base_path)+1:]
|
||||
manifest.append((path, mt))
|
||||
self.manifest = manifest
|
||||
if not self.authors:
|
||||
self.authors = [_('Unknown')]
|
||||
|
||||
def create_manifest(self, entries):
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -1427,6 +1427,8 @@ def export_to_dir(self, dir, indices, byauthor=False, single_dir=False,
|
|||
open(cpath, 'wb').write(cover)
|
||||
mi.cover = cname
|
||||
f = open(os.path.join(base, sanitize_file_name(name)+'.opf'), 'wb')
|
||||
if not mi.authors:
|
||||
mi.authors = [_('Unknown')]
|
||||
mi.render(f)
|
||||
f.close()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue