From 187d853b3a407996f6bcd96db4edac548246e83e Mon Sep 17 00:00:00 2001 From: j Date: Thu, 13 Nov 2025 09:30:35 +0100 Subject: [PATCH] fix censored selection --- management/commands/generate_clips.py | 1 + render.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/management/commands/generate_clips.py b/management/commands/generate_clips.py index 1be54fa..bf0f1d5 100644 --- a/management/commands/generate_clips.py +++ b/management/commands/generate_clips.py @@ -74,6 +74,7 @@ class Command(BaseCommand): if type_ == "original": original_target = target if options['censored'] and e.public_id in censored: + clip[type_ + "_censored"] = target target = '/srv/t_for_time/censored.mp4' clip[type_] = target durations.append(e.files.filter(selected=True)[0].duration) diff --git a/render.py b/render.py index f97a60a..0d45c0e 100644 --- a/render.py +++ b/render.py @@ -469,7 +469,11 @@ def get_fragments(clips, voice_over, prefix): fragment['clips'] = [] for clip in clips: #if set(clip['tags']) & set(fragment['tags']) and not set(clip['tags']) & set(fragment['anti-tags']): - if clip['original'] in originals: + key = 'original' + original = clip['original'] + if 'original_censored' in clip: + original = clip['original_censored'] + if original in originals: fragment['clips'].append(clip) fragment["voice_over"] = voice_over.get(str(fragment["id"]), {}) fragments.append(fragment)