mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-21 08:32:11 +02:00
Add discovery
This commit is contained in:
@@ -37,6 +37,9 @@ class RTLPlusDefaults:
|
||||
MANIFEST_ENDPOINT = (
|
||||
"https://stus.player.streamingtech.de/livestream/linear/{channel_id}?platform=web"
|
||||
)
|
||||
EVENT_MANIFEST_ENDPOINT = (
|
||||
"https://stus.player.streamingtech.de/liveevent/{content_id}?platform=web"
|
||||
)
|
||||
BASE_WEBSITE = "https://plus.rtl.de/"
|
||||
CONFIG_ENDPOINT = "https://plus.rtl.de/assets/config/config.json"
|
||||
|
||||
@@ -213,15 +216,17 @@ class RTLPlusConfig:
|
||||
self.auth_endpoint = config.get("auth_endpoint", RTLPlusDefaults.AUTH_ENDPOINT)
|
||||
self.graphql_endpoint = config.get("graphql_endpoint", RTLPlusDefaults.GRAPHQL_ENDPOINT)
|
||||
self.manifest_endpoint = config.get("manifest_endpoint", RTLPlusDefaults.MANIFEST_ENDPOINT)
|
||||
self.event_manifest_endpoint = config.get("event_manifest_endpoint", RTLPlusDefaults.EVENT_MANIFEST_ENDPOINT)
|
||||
self.base_website = config.get("base_website", RTLPlusDefaults.BASE_WEBSITE)
|
||||
self.config_endpoint = config.get("config_endpoint", RTLPlusDefaults.CONFIG_ENDPOINT)
|
||||
|
||||
# HTTP settings
|
||||
self.timeout = config.get("timeout", RTLPlusDefaults.DEFAULT_TIMEOUT)
|
||||
|
||||
def get_manifest_url(self, channel_id: str) -> str:
|
||||
"""Get manifest URL for a specific channel"""
|
||||
return self.manifest_endpoint.format(channel_id=channel_id)
|
||||
def get_manifest_url(self, content_id: str) -> str:
|
||||
if "live-events" in content_id:
|
||||
return self.event_manifest_endpoint.format(content_id=content_id)
|
||||
return self.manifest_endpoint.format(channel_id=content_id)
|
||||
|
||||
def get_base_headers(self) -> dict:
|
||||
"""Get base headers with this config's user agent"""
|
||||
|
||||
@@ -229,12 +229,9 @@ class RTLPlusLiveEvent:
|
||||
start = isoparse(self.stream_start)
|
||||
end = isoparse(self.stream_end)
|
||||
|
||||
# Derive a stable content_id from the RRN (last segment after last colon)
|
||||
content_id = self.id.split(":")[-1]
|
||||
|
||||
return Event(
|
||||
name=self.title,
|
||||
content_id=content_id,
|
||||
content_id=self.id,
|
||||
provider=provider,
|
||||
start_time=start,
|
||||
end_time=end,
|
||||
|
||||
@@ -348,7 +348,7 @@ class RTLPlusProvider(StreamingProvider):
|
||||
logger.debug(f"RTL+ Manifest Data: {self._sanitize_manifest_log(manifest_data)}")
|
||||
|
||||
# Process manifest data
|
||||
quality_preference = ["dashhd", "dashsd"]
|
||||
quality_preference = ["dashhd", "dashfree", "dashsd"]
|
||||
|
||||
for quality in quality_preference:
|
||||
for stream in manifest_data:
|
||||
|
||||
Reference in New Issue
Block a user