From df606af80e769360fd859075aabe5b2eb4764c56 Mon Sep 17 00:00:00 2001 From: Robert Wojciechowski Date: Sat, 28 Feb 2026 00:26:18 +0000 Subject: [PATCH] fix: sync LoadVideo 'file' media refs for remote workers --- api/orchestration/media_sync.py | 4 ++-- tests/api/test_media_sync.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/orchestration/media_sync.py b/api/orchestration/media_sync.py index 877d4ed..37b8b85 100644 --- a/api/orchestration/media_sync.py +++ b/api/orchestration/media_sync.py @@ -57,13 +57,13 @@ def convert_paths_for_platform(obj, target_separator): def _find_media_references(prompt_obj): - """Find media file references in image/video/audio inputs used by worker prompts.""" + """Find media file references in image/video/audio/file inputs used by worker prompts.""" media_refs = set() for node in prompt_obj.values(): if not isinstance(node, dict): continue inputs = node.get("inputs", {}) - for key in ("image", "video", "audio"): + for key in ("image", "video", "audio", "file"): value = inputs.get(key) if isinstance(value, str): cleaned = re.sub(r"\s*\[\w+\]$", "", value).strip().replace("\\", "/") diff --git a/tests/api/test_media_sync.py b/tests/api/test_media_sync.py index 99cabf1..1f0422b 100644 --- a/tests/api/test_media_sync.py +++ b/tests/api/test_media_sync.py @@ -174,6 +174,11 @@ class FindMediaReferencesTests(unittest.TestCase): refs = ms._find_media_references(prompt) self.assertIn("clip.mp4", refs) + def test_finds_file_input_for_load_video(self): + prompt = {"1": {"class_type": "LoadVideo", "inputs": {"file": "1 - Copy.mp4"}}} + refs = ms._find_media_references(prompt) + self.assertIn("1 - Copy.mp4", refs) + def test_finds_audio_input(self): prompt = {"1": {"class_type": "LoadAudio", "inputs": {"audio": "track.wav"}}} refs = ms._find_media_references(prompt)