This commit is contained in:
Jesse Bannon 2025-05-31 09:24:12 -07:00
parent 84a1645335
commit 28f9d994f5

View file

@ -202,7 +202,9 @@ class ThrottleProtectionPlugin(Plugin[ThrottleProtectionOptions]):
) )
def ytdl_options(self) -> Optional[Dict]: 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: def initialize_subscription(self) -> bool:
if self.plugin_options.subscription_download_probability: if self.plugin_options.subscription_download_probability: