From ee204ecc2b7175d8877881971fc6a0778f142518 Mon Sep 17 00:00:00 2001 From: Nirvana Date: Fri, 27 Feb 2026 21:20:12 +0100 Subject: [PATCH] Add discovery --- lib/streaming_providers/providers/discovery/constants.py | 2 +- lib/streaming_providers/providers/discovery/provider.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/streaming_providers/providers/discovery/constants.py b/lib/streaming_providers/providers/discovery/constants.py index eff9595..37c6fcb 100644 --- a/lib/streaming_providers/providers/discovery/constants.py +++ b/lib/streaming_providers/providers/discovery/constants.py @@ -95,7 +95,7 @@ SUPPORTED_AUTH_TYPES: Final[List[str]] = [ # Wildcard sentinel — Discovery+ accepts any country; the user's actual country # is determined at runtime via the /users/me endpoint (currentLocationTerritory). -SUPPORTED_COUNTRIES: Final[str] = "*" +SUPPORTED_COUNTRIES: Final[List[str]] = ["*"] # Home market mapping (immutable) HOME_MARKET_MAPPING: Final[Dict[str, str]] = { diff --git a/lib/streaming_providers/providers/discovery/provider.py b/lib/streaming_providers/providers/discovery/provider.py index eac2668..6d2f552 100644 --- a/lib/streaming_providers/providers/discovery/provider.py +++ b/lib/streaming_providers/providers/discovery/provider.py @@ -310,9 +310,8 @@ class DiscoveryProvider(StreamingProvider): The user's actual serving country is determined at runtime via get_user_country(). """ - if self.SUPPORTED_COUNTRIES == "*": + if self.SUPPORTED_COUNTRIES == ["*"]: return bool(country and country.isalpha() and len(country) == 2) - # Fallback to standard list-based check if constant is ever changed back return country.lower() in [c.lower() for c in self.SUPPORTED_COUNTRIES] def get_user_country(self) -> Optional[str]: