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