From 2620466a2900231dcb6f63abdb4c43ee69904649 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Mon, 8 Jan 2024 05:26:07 +0000 Subject: [PATCH] optimize --- ovos_plugin_manager/ocp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ovos_plugin_manager/ocp.py b/ovos_plugin_manager/ocp.py index 8f5b7bf2..f4e8ab91 100644 --- a/ovos_plugin_manager/ocp.py +++ b/ovos_plugin_manager/ocp.py @@ -96,6 +96,11 @@ def extract_stream(self, uri, video=True): @lru_cache() # to avoid loading StreamHandler more than once +def load_stream_extractors(): + return StreamHandler() + + def available_extractors(): + xtract = load_stream_extractors() return ["/", "http:", "https:", "file:"] + \ - [f"{sei}//" for sei in StreamHandler().supported_seis] + [f"{sei}//" for sei in xtract.supported_seis]