mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the new generated covers for recipes that do not specify their own cover
This commit is contained in:
parent
ba8ea3bbae
commit
c5e0bb37b5
@ -1354,11 +1354,11 @@ class BasicNewsRecipe(Recipe):
|
||||
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…
x
Reference in New Issue
Block a user