diff --git a/lib/streaming_providers/providers/rtlplus/constants.py b/lib/streaming_providers/providers/rtlplus/constants.py index 89874b3..1edf695 100644 --- a/lib/streaming_providers/providers/rtlplus/constants.py +++ b/lib/streaming_providers/providers/rtlplus/constants.py @@ -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""" diff --git a/lib/streaming_providers/providers/rtlplus/models.py b/lib/streaming_providers/providers/rtlplus/models.py index eb757cd..207ce2e 100644 --- a/lib/streaming_providers/providers/rtlplus/models.py +++ b/lib/streaming_providers/providers/rtlplus/models.py @@ -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, diff --git a/lib/streaming_providers/providers/rtlplus/provider.py b/lib/streaming_providers/providers/rtlplus/provider.py index b622a63..9e05646 100644 --- a/lib/streaming_providers/providers/rtlplus/provider.py +++ b/lib/streaming_providers/providers/rtlplus/provider.py @@ -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: