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

Avoid potential image overlaps with nested sections

This commit is contained in:
David Lynch 2024-12-04 16:51:21 -06:00
parent 1fe907bec2
commit bedaec9989

View file

@ -114,11 +114,11 @@ def chapter_html(
if img['src'] not in already_fetched_images: if img['src'] not in already_fetched_images:
img_contents = get_image_from_url(img['src'], image_format, compress_images, max_image_size, always_convert_images) img_contents = get_image_from_url(img['src'], image_format, compress_images, max_image_size, always_convert_images)
chapter.images.append(Image( chapter.images.append(Image(
path=f"images/ch{i}_leechimage_{count}.{img_contents[1]}", path=f"{story.id}/images/ch{i}_leechimage_{count}.{img_contents[1]}",
contents=img_contents[0], contents=img_contents[0],
content_type=img_contents[2] content_type=img_contents[2]
)) ))
already_fetched_images[img['src']] = f"../images/ch{i}_leechimage_{count}.{img_contents[1]}" already_fetched_images[img['src']] = f"images/ch{i}_leechimage_{count}.{img_contents[1]}"
else: else:
print(img['src'], "(already", already_fetched_images.get(img['src']), ")") print(img['src'], "(already", already_fetched_images.get(img['src']), ")")