diff --git a/lib/streaming_providers/base/models/channel.py b/lib/streaming_providers/base/models/channel.py index 3f4f8f1..2502f70 100644 --- a/lib/streaming_providers/base/models/channel.py +++ b/lib/streaming_providers/base/models/channel.py @@ -14,6 +14,7 @@ class Channel(Content): channel_number: Optional[int] = None is_radio: bool = False + catchup_hours: Optional[int] = None def __post_init__(self): self._validate_fields() @@ -46,6 +47,7 @@ class Channel(Content): result = super().to_dict() result["ChannelNumber"] = self.channel_number result["IsRadio"] = self.is_radio + result["CatchupHours"] = self.catchup_hours return result def is_audio_content(self) -> bool: diff --git a/lib/streaming_providers/providers/magentaeu/provider.py b/lib/streaming_providers/providers/magentaeu/provider.py index c47a617..dc42515 100644 --- a/lib/streaming_providers/providers/magentaeu/provider.py +++ b/lib/streaming_providers/providers/magentaeu/provider.py @@ -237,6 +237,8 @@ class MagentaEUProvider(StreamingProvider): media_pid = channel_data.get("media_pid", "") is_audio = channel_data.get("is_audio", False) + catchup_hours = channel_data.get("CatchupHours", self.catchup_window) + # Build manifest script from bifrost metadata fields manifest_script_parts = [] if tp_channel.channel_number: @@ -268,6 +270,7 @@ class MagentaEUProvider(StreamingProvider): is_radio=is_audio, language=get_language(self.country), streaming_format=STREAMING_FORMAT_DASH, + catchup_hours=catchup_hours, ) channels.append(streaming_channel)