mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-18 07:02:27 +02:00
catchup window from channels
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user