mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-27 19:42:37 +02:00
Add discovery
This commit is contained in:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user