Restructure for enabling/disabling

This commit is contained in:
Nirvana
2025-12-25 21:32:10 +01:00
parent 5b3b80c416
commit e3ff1709b2
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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',