catchup window from channels

This commit is contained in:
Nirvana
2026-06-11 11:30:54 +02:00
parent b280efbc77
commit 3b3450c193
2 changed files with 5 additions and 0 deletions
@@ -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:
@@ -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)