1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-22 00:04:16 +01:00

Fix sparse object passed for cover options

This commit is contained in:
David Lynch 2019-10-14 00:29:40 -05:00
parent 9d0b5f1d3a
commit ac3ba8db77

View file

@ -109,7 +109,7 @@ def generate_epub(story, cover_options={}, output_filename=None):
# The cover is static, and the only change comes from the image which we generate
html = [('Cover', 'cover.html', cover_template)]
if cover_options and cover_options["cover_url"]:
if cover_options and "cover_url" in cover_options:
image = make_cover_from_url(cover_options["cover_url"], story.title, story.author)
elif story.cover_url:
image = make_cover_from_url(story.cover_url, story.title, story.author)