Browse Source

Do not regenerate existing photos

master
Marien Fressinaud 5 years ago
parent
commit
3955dcaf0f
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      boop.py

+ 4
- 2
boop.py View File

@@ -109,10 +109,12 @@ def generate_gallery_dir(output_path, gallery):

for photo in gallery["photos"]:
photo_output_path = os.path.join(output_path, photo["url"])
shutil.copyfile(photo["path"], photo_output_path)
if not os.path.exists(photo_output_path):
shutil.copyfile(photo["path"], photo_output_path)

thumb_output_path = os.path.join(output_path, photo["thumb_url"])
generate_thumb_file(thumb_output_path, photo)
if not os.path.exists(thumb_output_path):
generate_thumb_file(thumb_output_path, photo)


def generate_thumb_file(output_path, photo):

Loading…
Cancel
Save