Move RTL out of beta state

This commit is contained in:
Nirvana
2026-05-05 10:18:50 +02:00
parent bddd7fb9d9
commit a5440eb80a
3 changed files with 18 additions and 20 deletions
@@ -74,7 +74,7 @@ class RTLPlusAuthenticator(BaseOAuth2Authenticator):
@property
def oauth_token_redirect_uri(self) -> str:
# Used in the token exchange step
return f"{self.config.beta_website}silent-sso-iframe.html"
return f"{self.config.base_website}silent-sso-iframe.html"
@property
def config(self) -> RTLPlusConfig:
@@ -45,7 +45,6 @@ class RTLPlusDefaults:
AUTH_AUTHORIZE_ENDPOINT = f"{AUTH_BASE_URL}/auth"
GRAPHQL_ENDPOINT = "https://cdn.gateway.now-plus-prod.aws-cbc.cloud/graphql"
BASE_WEBSITE = "https://plus.rtl.de/"
BETA_WEBSITE = "https://beta.plus.rtl.de/"
CONFIG_ENDPOINT = "https://plus.rtl.de/assets/config/config.json"
# Bedrock API endpoints (Linear TV)
@@ -60,8 +59,8 @@ class RTLPlusDefaults:
# DRM Request Headers (common for all DRM types)
DRM_COMMON_HEADERS = {
"origin": BETA_WEBSITE.rstrip("/"),
"referer": BETA_WEBSITE,
"origin": BASE_WEBSITE.rstrip("/"),
"referer": BASE_WEBSITE,
}
# Direct CDN
@@ -324,8 +323,8 @@ class RTLPlusHeaders:
headers = dict(RTLPlusHeaders._COMMON_HEADERS)
headers.update({
"authorization": f"Bearer {oauth_token}",
"origin": RTLPlusDefaults.BETA_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BETA_WEBSITE,
"origin": RTLPlusDefaults.BASE_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BASE_WEBSITE,
"user-agent": user_agent,
"x-auth-device-id": device_id,
"x-auth-device-name": RTLPlusDefaults.DEVICE_NAME,
@@ -360,8 +359,8 @@ class RTLPlusHeaders:
headers = dict(RTLPlusHeaders._COMMON_HEADERS)
headers.update({
"authorization": f"Bearer {oauth_token}",
"origin": RTLPlusDefaults.BETA_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BETA_WEBSITE,
"origin": RTLPlusDefaults.BASE_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BASE_WEBSITE,
"request-timeout": "10000",
"user-agent": user_agent,
"x-bedrock-token": bedrock_token,
@@ -384,8 +383,8 @@ class RTLPlusHeaders:
headers = dict(RTLPlusHeaders._COMMON_HEADERS)
headers.update({
"authorization": f"Bearer {oauth_token}",
"origin": RTLPlusDefaults.BETA_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BETA_WEBSITE,
"origin": RTLPlusDefaults.BASE_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BASE_WEBSITE,
"user-agent": user_agent,
"x-bedrock-token": bedrock_token,
"x-auth-device-id": device_id,
@@ -417,8 +416,8 @@ class RTLPlusHeaders:
headers = dict(RTLPlusHeaders._COMMON_HEADERS)
headers.update({
"authorization": f"Bearer {oauth_token}",
"origin": RTLPlusDefaults.BETA_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BETA_WEBSITE,
"origin": RTLPlusDefaults.BASE_WEBSITE.rstrip("/"),
"referer": RTLPlusDefaults.BASE_WEBSITE,
"user-agent": user_agent,
"x-bedrock-token": bedrock_token,
"x-client-release": client_version,
@@ -449,7 +448,6 @@ class RTLPlusConfig:
self.auth_endpoint = config.get("auth_endpoint", RTLPlusDefaults.AUTH_ENDPOINT)
self.graphql_endpoint = config.get("graphql_endpoint", RTLPlusDefaults.GRAPHQL_ENDPOINT)
self.base_website = config.get("base_website", RTLPlusDefaults.BASE_WEBSITE)
self.beta_website = config.get("beta_website", RTLPlusDefaults.BETA_WEBSITE)
self.config_endpoint = config.get("config_endpoint", RTLPlusDefaults.CONFIG_ENDPOINT)
# Bedrock endpoints (Linear TV)
@@ -166,7 +166,7 @@ class RTLPlusProvider(StreamingProvider):
# Auto-generate location header if not provided
if location is None and layout_type in ("live", "video", "folder", "program", "alias"):
location = f"{self.rtl_config.beta_website}{clean_content_id}"
location = f"{self.rtl_config.base_website}{clean_content_id}"
# Build request - handle alias layouts specially
if layout_type == "alias":
@@ -444,7 +444,7 @@ class RTLPlusProvider(StreamingProvider):
clean_id = program_id.replace("program_", "")
url = f"{self.rtl_config.bedrock_layout_base}/program/{clean_id}/layout"
location = f"{self.rtl_config.beta_website}p_{clean_id}-p_{clean_id}"
location = f"{self.rtl_config.base_website}p_{clean_id}-p_{clean_id}"
headers = self.rtl_config.get_layout_headers(oauth_token, bedrock_token, location)
params = {"blockPage": 1, "nbPages": 2}
@@ -570,9 +570,9 @@ class RTLPlusProvider(StreamingProvider):
# Build the correct location header
if program_slug and program_id and content_id.startswith("clip_"):
clip_slug = f"{program_slug}-c_{content_id.replace('clip_', '')}"
location = f"{self.rtl_config.beta_website}{program_slug}-p_{program_id}/video/{clip_slug}"
location = f"{self.rtl_config.base_website}{program_slug}-p_{program_id}/video/{clip_slug}"
else:
location = f"{self.rtl_config.beta_website}{content_id}"
location = f"{self.rtl_config.base_website}{content_id}"
layout = self.fetch_layout(
layout_type="video",
@@ -604,7 +604,7 @@ class RTLPlusProvider(StreamingProvider):
layout = self.fetch_layout(
layout_type="video",
content_id=content_id,
location=f"{self.rtl_config.beta_website}{content_id}"
location=f"{self.rtl_config.base_website}{content_id}"
)
if not layout:
@@ -680,8 +680,8 @@ class RTLPlusProvider(StreamingProvider):
drm_configs = create_drmtoday_configs(
upfront_token=upfront_token,
origin=self.rtl_config.beta_website.rstrip("/"),
referer=self.rtl_config.beta_website,
origin=self.rtl_config.base_website.rstrip("/"),
referer=self.rtl_config.base_website,
user_agent=self.rtl_config.user_agent,
playready_user_agent=RTLPlusDefaults.PLAYREADY_USER_AGENT,
)