From 9453b76099ec03b3cea859f812890adb36e13df9 Mon Sep 17 00:00:00 2001 From: Stijn Peeters Date: Mon, 18 Nov 2024 13:57:27 +0100 Subject: [PATCH] Don't crash on skipped videos in scene detector --- processors/visualisation/video_scene_identifier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/processors/visualisation/video_scene_identifier.py b/processors/visualisation/video_scene_identifier.py index 634e8c49..5140baa0 100644 --- a/processors/visualisation/video_scene_identifier.py +++ b/processors/visualisation/video_scene_identifier.py @@ -252,8 +252,9 @@ def process(self): if video_data.get('success'): files = video_data.get('files') if 'files' in video_data else [{"filename": video_data.get("filename"), "success":True}] for file in files: - if not file.get("success"): + if not file.get("success") or file.get("filename") not in collected_scenes: continue + # List types are not super fun for CSV if 'post_ids' in video_data: video_data['post_ids'] = ','.join([str(i) for i in video_data['post_ids']])