Quellcode durchsuchen

Do not regenerate existing photos

master
Marien Fressinaud vor 6 Jahren
Ursprung
Commit
3955dcaf0f
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4
    2
      boop.py

+ 4
- 2
boop.py Datei anzeigen

@@ -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):

Laden…
Abbrechen
Speichern