mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 01:33:44 +02:00
Use the new generated covers for recipes that do not specify their own cover
This commit is contained in:
parent
ba8ea3bbae
commit
c5e0bb37b5
1 changed files with 2 additions and 2 deletions
|
|
@ -1354,11 +1354,11 @@ def default_cover(self, cover_file):
|
|||
Create a generic cover for recipes that dont have a cover
|
||||
'''
|
||||
try:
|
||||
from calibre.ebooks import calibre_cover
|
||||
from calibre.ebooks.covers import create_cover
|
||||
title = self.title if isinstance(self.title, unicode) else \
|
||||
self.title.decode(preferred_encoding, 'replace')
|
||||
date = strftime(self.timefmt)
|
||||
img_data = calibre_cover(title, date)
|
||||
img_data = create_cover(title, [date])
|
||||
cover_file.write(img_data)
|
||||
cover_file.flush()
|
||||
except:
|
||||
|
|
|
|||
Loading…
Reference in a new issue