mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-10-05 07:22:24 +02:00
Add discovery
This commit is contained in:
@@ -27,22 +27,22 @@ class ProviderMetadata:
|
||||
supports_multiple = self.plugin_class.supports_multiple_countries()
|
||||
|
||||
if supports_multiple:
|
||||
# Multi-country provider: include country in name
|
||||
self.name = f"{self.plugin_name}_{self.country}"
|
||||
self.is_multi_country = True
|
||||
else:
|
||||
# Single-country provider
|
||||
self.name = self.plugin_name
|
||||
|
||||
# Check if provider has an explicit single country
|
||||
supported_countries = self.plugin_class.get_static_supported_countries()
|
||||
if len(supported_countries) == 1 and supported_countries[0] != "*":
|
||||
# Provider has exactly one supported country (e.g., HRTi with ["HR"])
|
||||
# Use that country instead of the passed-in country
|
||||
# True single-country provider (e.g. HRTi hardcoded to "HR")
|
||||
self.name = self.plugin_name
|
||||
self.country = supported_countries[0].upper()
|
||||
self.is_multi_country = False
|
||||
elif supported_countries == ["*"]:
|
||||
# Wildcard provider: name includes the runtime country (e.g. "discovery_de")
|
||||
self.name = f"{self.plugin_name}_{self.country.lower()}"
|
||||
self.is_multi_country = False
|
||||
else:
|
||||
# True single-country or country-agnostic (empty list)
|
||||
# Country-agnostic or empty list
|
||||
self.name = self.plugin_name
|
||||
self.is_multi_country = False
|
||||
|
||||
# Rest of the method remains the same...
|
||||
|
||||
Reference in New Issue
Block a user