Use the new generated covers for recipes that do not specify their own cover

This commit is contained in:
Kovid Goyal 2014-09-14 17:48:59 +05:30
parent ba8ea3bbae
commit c5e0bb37b5

View File

@ -1354,11 +1354,11 @@ class BasicNewsRecipe(Recipe):
Create a generic cover for recipes that dont have a cover Create a generic cover for recipes that dont have a cover
''' '''
try: try:
from calibre.ebooks import calibre_cover from calibre.ebooks.covers import create_cover
title = self.title if isinstance(self.title, unicode) else \ title = self.title if isinstance(self.title, unicode) else \
self.title.decode(preferred_encoding, 'replace') self.title.decode(preferred_encoding, 'replace')
date = strftime(self.timefmt) date = strftime(self.timefmt)
img_data = calibre_cover(title, date) img_data = create_cover(title, [date])
cover_file.write(img_data) cover_file.write(img_data)
cover_file.flush() cover_file.flush()
except: except: