diff --git a/src/ytdl_sub/plugins/throttle_protection.py b/src/ytdl_sub/plugins/throttle_protection.py index 70c7122f..c48ab5ef 100644 --- a/src/ytdl_sub/plugins/throttle_protection.py +++ b/src/ytdl_sub/plugins/throttle_protection.py @@ -202,7 +202,9 @@ class ThrottleProtectionPlugin(Plugin[ThrottleProtectionOptions]): ) def ytdl_options(self) -> Optional[Dict]: - return {"sleep_interval_requests": self.plugin_options.sleep_per_request_s.max_value()} + if self.plugin_options.sleep_per_request_s is not None: + return {"sleep_interval_requests": self.plugin_options.sleep_per_request_s.max_value()} + return {} def initialize_subscription(self) -> bool: if self.plugin_options.subscription_download_probability: