From f780a4c4ece3dd184e477b8df1992d445684ba8b Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Fri, 28 Oct 2022 16:14:17 +0200 Subject: capture-pipeline: Streamline audio/video source base Signed-off-by: Paul Kocialkowski --- capture-pipeline | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/capture-pipeline b/capture-pipeline index d5950bd..59051b3 100755 --- a/capture-pipeline +++ b/capture-pipeline @@ -71,12 +71,12 @@ def audio_suffix(shot): return "." + settings_item_entry(shot, "audio-extension") def audio_source_base(sequence, shot): - if "audio-source" in shot: - prefix = shot["audio-source"] - else: - prefix = settings["audio-source"] + base = settings_item_entry(shot, "audio-source") + + if "label" in sequence: + base = os.path.join(base, sequence["label"]) - return os.path.join(prefix, sequence["label"]) + return base def audio_source_name(sequence, shot, take): base = audio_source_base(sequence, shot) @@ -250,7 +250,12 @@ def video_suffix(shot): return "." + settings_item_entry(shot, "video-extension") def video_source_base(sequence, shot): - return os.path.join(settings_item_entry(shot, "video-source"), sequence["label"]) + base = settings_item_entry(shot, "video-source") + + if "label" in sequence: + base = os.path.join(base, sequence["label"]) + + return base def video_source_name(sequence, shot, take): base = video_source_base(sequence, shot) -- cgit v1.2.3