Add discovery

This commit is contained in:
Nirvana
2026-02-27 21:20:12 +01:00
parent 9e39a54a68
commit ee204ecc2b
2 changed files with 2 additions and 3 deletions
@@ -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]] = {
@@ -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]: