mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-07 19:08:30 +03:00
new check for edge case
This commit is contained in:
@@ -59,6 +59,9 @@ class ThumbnailEnricher(Enricher):
|
||||
).run()
|
||||
|
||||
try:
|
||||
if not os.path.exists(output_path):
|
||||
logger.info(f"thumbnail {index} for media {m.filename} was not created")
|
||||
continue
|
||||
thumbnails_media.append(
|
||||
Media(filename=output_path)
|
||||
.set("id", f"thumbnail_{index}")
|
||||
|
||||
@@ -25,6 +25,7 @@ def mock_ffmpeg_environment(mocker):
|
||||
# Mocking all the ffmpeg calls in one place
|
||||
mock_ffmpeg_input = mocker.patch("ffmpeg.input")
|
||||
mock_makedirs = mocker.patch("os.makedirs")
|
||||
mocker.patch("os.path.exists", return_value=True)
|
||||
(mocker.patch.object(Media, "is_video", return_value=True),)
|
||||
mock_probe = mocker.patch(
|
||||
"ffmpeg.probe",
|
||||
|
||||
Reference in New Issue
Block a user