This commit is contained in:
Kovid Goyal 2017-06-04 20:05:34 +05:30
parent adbfdc858e
commit 7f65bc11b1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -159,7 +159,7 @@ def cover(ctx, rd, library_id, db, book_id, width=None, height=None):
def book_filename(rd, book_id, mi, fmt):
au = authors_to_string(mi.authors or [_('Unknown')])
title = mi.title or _('Unknown')
ext = fmt
ext = fmt.lower()
if ext == 'kepub' and 'Kobo Touch' in rd.inheaders.get('User-Agent', ''):
ext = 'kepub.epub'
fname = '%s - %s_%s.%s' % (title[:30], au[:30], book_id, ext)