From 1af1a4882d5db623cd09b41d395d763f04bd0808 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Sun, 25 Jan 2026 09:39:52 -0800 Subject: [PATCH] reproduce original issue --- tests/unit/plugins/test_ytdl_options.py | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/unit/plugins/test_ytdl_options.py b/tests/unit/plugins/test_ytdl_options.py index 7a545757..14eef31f 100644 --- a/tests/unit/plugins/test_ytdl_options.py +++ b/tests/unit/plugins/test_ytdl_options.py @@ -73,3 +73,31 @@ class TestYtdlOptions: preset_name="test_ytdl_options", preset_dict=preset_dict, ).download(dry_run=False) + + def test_ytdl_option_types_preserved( + self, + default_config: ConfigFile, + output_directory: str, + ): + preset_dict = { + "download": "https://your.name.here", + "output_options": {"output_directory": output_directory, "file_name": "will_error.mp4"}, + "ytdl_options": { + "break_on_existing": True, + "js_runtimes": {"deno": {"path": "/usr/local/bin/deno"}}, + }, + } + + sub = Subscription.from_dict( + config=default_config, + preset_name="test_ytdl_options", + preset_dict=preset_dict, + ) + + expected = { + "break_on_existing": True, + "js_runtimes": {"deno": {"path": "/usr/local/bin/deno"}}, + } + out = sub.ytdl_options.to_native_dict(sub.overrides) + + assert out == expected