From 39bfde2026d1b34bb49581fe942aa7944d2c39e0 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 1 Feb 2023 00:35:48 +0000 Subject: [PATCH] thumbnails bug fix --- src/auto_archiver/enrichers/thumbnail_enricher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auto_archiver/enrichers/thumbnail_enricher.py b/src/auto_archiver/enrichers/thumbnail_enricher.py index 2958213..2816db5 100644 --- a/src/auto_archiver/enrichers/thumbnail_enricher.py +++ b/src/auto_archiver/enrichers/thumbnail_enricher.py @@ -21,10 +21,10 @@ class ThumbnailEnricher(Enricher): def enrich(self, to_enrich: Metadata) -> None: logger.debug(f"generating thumbnails") - folder = os.path.join(to_enrich.get_tmp_dir(), str(uuid.uuid4())) - os.makedirs(folder, exist_ok=True) for i, m in enumerate(to_enrich.media[::]): if m.is_video(): + folder = os.path.join(to_enrich.get_tmp_dir(), str(uuid.uuid4())) + os.makedirs(folder, exist_ok=True) logger.debug(f"generating thumbnails for {m.filename}") fps, duration = 0.5, m.get("duration") if duration is not None: