Enable provider

This commit is contained in:
Nirvana
2025-12-22 15:41:34 +01:00
parent 5c547ba40d
commit 3e09d42ba2
2 changed files with 10 additions and 4 deletions
@@ -321,7 +321,7 @@ class ProviderEnableManager:
result[provider_name] = {
"enabled": enabled,
"source": source.value,
"source": source.value, # Convert enum to string
"can_modify": source != EnableSource.KODI
}
@@ -348,7 +348,7 @@ class ProviderEnableManager:
return {
"provider": provider_name,
"enabled": enabled,
"source": source.value,
"source": source.value, # Convert enum to string
"can_modify": source != EnableSource.KODI,
"in_file": True
}
+8 -2
View File
@@ -2039,9 +2039,12 @@ class UltimateService:
# Get source information
source = enable_manager.get_enabled_source(provider)
# FIX: Convert enum to string value for JSON serialization
source_value = source.value if hasattr(source, 'value') else str(source)
result[provider] = {
'enabled': status,
'source': source, # 'kodi', 'file', or 'default'
'source': source_value, # Now a string, not an enum
'can_modify': source != 'kodi' # Can't modify if set in Kodi
}
@@ -2069,11 +2072,14 @@ class UltimateService:
status = enable_manager.is_provider_enabled(provider)
source = enable_manager.get_enabled_source(provider)
# FIX: Convert enum to string value
source_value = source.value if hasattr(source, 'value') else str(source)
return {
'success': True,
'provider': provider,
'enabled': status,
'source': source,
'source': source_value, # Now a string
'can_modify': source != 'kodi'
}