From 9dec3cb729a21816c789fa3101a51337c502fb74 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sat, 3 Aug 2024 16:21:05 +0000 Subject: [PATCH] Allow the youtube-manual upload backend to modify videos So we can modify youtube videos we manually uploaded. If the video isn't actually ours, it will error when the modify is attempted which is ok. --- cutter/cutter/main.py | 4 +++- docker-compose.jsonnet | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cutter/cutter/main.py b/cutter/cutter/main.py index fdb781d..1ce728f 100644 --- a/cutter/cutter/main.py +++ b/cutter/cutter/main.py @@ -930,6 +930,7 @@ def main( for location, backend_config in config.items(): backend_type = backend_config.pop('type') no_updater = backend_config.pop('no_updater', False) + no_uploader = backend_config.pop('no_uploader', False) cut_type = backend_config.pop('cut_type', 'full') if backend_type == 'youtube': backend_type = Youtube @@ -945,7 +946,8 @@ def main( backend.encoding_settings = cut_type elif cut_type != 'full': raise ValueError("Unknown cut type: {!r}".format(cut_type)) - upload_locations[location] = backend + if not no_uploader: + upload_locations[location] = backend if backend.needs_transcode: needs_transcode_check[location] = backend if not no_updater: diff --git a/docker-compose.jsonnet b/docker-compose.jsonnet index 51cd584..1177bc4 100644 --- a/docker-compose.jsonnet +++ b/docker-compose.jsonnet @@ -133,6 +133,8 @@ // Backup options for advanced use, if the smart cut breaks things. desertbus_slow: {type: "youtube", cut_type: "full"}, desertbus_emergency: {type: "youtube", cut_type: "fast"}, + // Non-uploading backend that lets us modify manually-updated youtube videos + "youtube-manual": {type: "youtube", no_uploader: true}. }, default_location:: "desertbus", // archive location is the default location for archive events,