diff --git a/lib/streaming_providers/providers/magenta2/constants.py b/lib/streaming_providers/providers/magenta2/constants.py index 8cbc40f..26efca0 100644 --- a/lib/streaming_providers/providers/magenta2/constants.py +++ b/lib/streaming_providers/providers/magenta2/constants.py @@ -384,4 +384,26 @@ PVR_TIMER_TYPE_EPG_ONE_SHOT = 1 # Recording statuses that represent pending timers (not yet captured). # Used as the byRecordingStatus filter in TimersManager.get_timers(). # Kept as a list (like the STATUSES_ACTIVE/ALL siblings) for easy pipe-joining. -PVR_RECORDING_STATUSES_TIMERS = ["SCHEDULED"] \ No newline at end of file +PVR_RECORDING_STATUSES_TIMERS = ["SCHEDULED"] + +# ============================================================================ +# Distribution Package Names +# ============================================================================ + +# Maps distribution IDs (returned by getApplicableDistributionRights) to +# human-readable package names. Used only for logging — the raw IDs are still +# passed to the entitled-channels feed as before. +DISTRIBUTION_PACKAGE_NAMES: dict = { + 366135709: "All", + 268235282: "Magenta TV Basic", + 376449962: "FAST Channels", + 424231094: "Sky Sport", + 424239773: "Sky Sport Bundesliga", + 268235273: "MagentaSport / myTeamTV", + 268236341: "Turkish Basic", + 268234936: "Turkish Premium", + 268235877: "Italian", + 268234482: "Polish", + 268234476: "RTL Premium", + 338937809: "Sky Sport News", +} \ No newline at end of file diff --git a/lib/streaming_providers/providers/magenta2/provider.py b/lib/streaming_providers/providers/magenta2/provider.py index 0e2e44e..b6a752e 100644 --- a/lib/streaming_providers/providers/magenta2/provider.py +++ b/lib/streaming_providers/providers/magenta2/provider.py @@ -26,6 +26,7 @@ from .constants import ( DEFAULT_MAX_RETRIES, DEFAULT_PLATFORM, DEFAULT_REQUEST_TIMEOUT, + DISTRIBUTION_PACKAGE_NAMES, DRM_SYSTEM_WIDEVINE, ERROR_CODES, MAGENTA2_CLIENT_IDS, @@ -952,6 +953,13 @@ class Magenta2Provider(StreamingProvider): extra_headers=auth_headers, ) + # Log subscription packages by resolving distribution IDs to names + package_names = [ + DISTRIBUTION_PACKAGE_NAMES.get(int(dist_id), f"Unknown package ({dist_id})") + for dist_id in distribution_rights + ] + logger.info(f"Active subscription packages ({len(package_names)}): {', '.join(package_names)}") + # ── Step 2: fetch entitled-channels feed ───────────────────────── feed_url = ( self.endpoint_manager.get_endpoint("mpx_feed_entitledChannelsFeed")