From b0d684a220a70b07fd666f9e38715583b201afcb Mon Sep 17 00:00:00 2001 From: Nirvana Date: Thu, 28 May 2026 10:43:36 +0200 Subject: [PATCH] Refactor joyn --- .../providers/joyn/auth.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/streaming_providers/providers/joyn/auth.py b/lib/streaming_providers/providers/joyn/auth.py index d17c110..997457f 100644 --- a/lib/streaming_providers/providers/joyn/auth.py +++ b/lib/streaming_providers/providers/joyn/auth.py @@ -121,7 +121,7 @@ class JoynAuthenticator(BaseOAuth2Authenticator): self.platform = platform self.distribution_tenant = COUNTRY_TENANT_MAPPING[country] - # Initialize base class FIRST to ensure proper config/http_manager setup + # Initialize base class FIRST super().__init__( provider_name="joyn", settings_manager=settings_manager, @@ -133,7 +133,22 @@ class JoynAuthenticator(BaseOAuth2Authenticator): proxy_config=proxy_config, ) - # Enable OIDC discovery using 7pass base URL + # Initialize _config manually if the base class didn't + if not hasattr(self, '_config') or self._config is None: + # Create a simple config object with the needed attributes + from types import SimpleNamespace + self._config = SimpleNamespace( + provider_name="joyn", + settings_manager=settings_manager, + config_dir=config_dir, + timeout=30, + max_retries=3, + ) + # Also set config if that's what the base class expects + if not hasattr(self, 'config') or self.config is None: + self.config = self._config + + # Now it's safe to enable OIDC discovery self.enable_oidc_discovery(JOYN_7PASS_BASE_URL) # Joyn's 7pass flow doesn't use PKCE