mirror of
https://github.com/kemayo/leech
synced 2026-05-05 19:12:09 +02:00
Download cover image if cover_url is in json
This commit is contained in:
parent
f2fc2c11db
commit
1f57305e11
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
# The cover is static, and the only change comes from the image which we generate
|
||||||
html = [('Cover', 'cover.html', cover_template)]
|
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)
|
image = make_cover_from_url(story.cover_url, story.title, story.author)
|
||||||
else:
|
else:
|
||||||
image = make_cover(story.title, story.author, **cover_options)
|
image = make_cover(story.title, story.author, **cover_options)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue