mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-25 18:42:27 +02:00
Restructure for enabling/disabling
This commit is contained in:
@@ -931,7 +931,7 @@ class StreamingProvider(ABC):
|
||||
Returns:
|
||||
True if provider supports country-specific instances
|
||||
"""
|
||||
return len(cls.SUPPORTED_COUNTRIES) > 0
|
||||
return len(cls.SUPPORTED_COUNTRIES) > 1
|
||||
|
||||
@classmethod
|
||||
def validate_country(cls, country: str) -> bool:
|
||||
|
||||
@@ -24,6 +24,7 @@ class HRTiProvider(StreamingProvider):
|
||||
PROVIDER_LABEL: ClassVar[str] = "HRTi"
|
||||
SUPPORTED_AUTH_TYPES: ClassVar[List[str]] = ['client_credentials', 'user_credentials']
|
||||
PROVIDER_LOGO: ClassVar[str] = HRTiDefaults.PROVIDER_LOGO
|
||||
SUPPORTED_COUNTRIES: ClassVar[List[str]] = ['HR']
|
||||
|
||||
def __init__(self, country: str = 'HR', config: Optional[Dict] = None, proxy_config: Optional[ProxyConfig] = None):
|
||||
super().__init__(country)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# streaming_providers/providers/magenta_eu/__init__.py
|
||||
from .provider import MagentaProvider
|
||||
from .provider import MagentaEUProvider
|
||||
from .auth import MagentaAuthenticator, MagentaAuthToken
|
||||
from .constants import (
|
||||
SUPPORTED_COUNTRIES,
|
||||
@@ -9,7 +9,7 @@ from .constants import (
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
'MagentaProvider',
|
||||
'MagentaEUProvider',
|
||||
'MagentaAuthenticator',
|
||||
'MagentaAuthToken',
|
||||
'SUPPORTED_COUNTRIES',
|
||||
|
||||
Reference in New Issue
Block a user