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

Download cover image if cover_url is in json

This commit is contained in:
Alex Raubach 2018-09-10 23:13:26 -04:00
parent f2fc2c11db
commit 1f57305e11

View file

@ -107,7 +107,9 @@ 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 story.cover_url:
if cover_options["cover_url"]:
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)
else:
image = make_cover(story.title, story.author, **cover_options)