mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-10-02 14:02:32 +02:00
Add web config
This commit is contained in:
@@ -113,6 +113,7 @@ class ProviderManager:
|
||||
enabled_countries = []
|
||||
for country_code in countries:
|
||||
# CHECK COUNTRY-SPECIFIC ENABLED STATUS
|
||||
logger.debug(f"DEBUG: Checking enable for {provider_name}_{country_code}")
|
||||
if not self._is_provider_enabled(provider_name, country_code):
|
||||
logger.debug(
|
||||
f"ProviderManager: Provider '{provider_name}_{country_code}' is disabled, skipping")
|
||||
|
||||
@@ -70,9 +70,7 @@ class KodiSettingsBridge:
|
||||
"""Get setting value, works in both Kodi and standalone mode"""
|
||||
if self.is_kodi_environment():
|
||||
try:
|
||||
value = self.addon.getSetting(setting_id)
|
||||
logger.debug(f"DEBUG Kodi getSetting('{setting_id}') returned: '{value}'")
|
||||
return value or default
|
||||
return self.addon.getSetting(setting_id) or default
|
||||
except Exception as e:
|
||||
logger.error(f"Error getting setting {setting_id}: {e}")
|
||||
return default
|
||||
|
||||
@@ -1320,6 +1320,16 @@ class SettingsManager:
|
||||
|
||||
def is_provider_enabled(self, provider_name: str, country: Optional[str] = None) -> bool:
|
||||
"""Check if provider is enabled (using ProviderEnableManager)"""
|
||||
logger.debug(f"DEBUG SettingsManager.is_provider_enabled({provider_name}, {country})")
|
||||
|
||||
# Handle country parameter if provider_name doesn't have suffix
|
||||
if country and '_' not in provider_name:
|
||||
provider_to_check = f"{provider_name}_{country}"
|
||||
else:
|
||||
provider_to_check = provider_name
|
||||
|
||||
logger.debug(f"DEBUG provider_to_check: {provider_to_check}")
|
||||
|
||||
# Import here to avoid circular imports
|
||||
from .provider_enable_manager import ProviderEnableManager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user