From e62a9fedde8352a49bffc96cc4a61634bd1ada6b Mon Sep 17 00:00:00 2001 From: Nirvana Date: Fri, 5 Dec 2025 11:31:50 +0100 Subject: [PATCH] Implement epg --- .../base/models/streaming_channel.py | 10 ---------- .../providers/magentaeu/provider.py | 2 ++ resources/config/magentaeu_at_epg_mapping.json | 4 ---- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/streaming_providers/base/models/streaming_channel.py b/lib/streaming_providers/base/models/streaming_channel.py index 599e82b..47809a1 100644 --- a/lib/streaming_providers/base/models/streaming_channel.py +++ b/lib/streaming_providers/base/models/streaming_channel.py @@ -89,10 +89,6 @@ class StreamingChannel: # NEW: Radio support (backward compatible - defaults to False) is_radio: bool = False - audio_only: bool = False - radio_frequency: Optional[str] = None # e.g., "FM 98.5" - radio_station_id: Optional[str] = None - bitrate: Optional[str] = None # e.g., "128kbps" def __post_init__(self): """ @@ -167,10 +163,6 @@ class StreamingChannel: 'StreamingFormat': self.streaming_format, # NEW: Radio fields (backward compatible addition) 'IsRadio': self.is_radio, - 'AudioOnly': self.audio_only, - 'RadioFrequency': self.radio_frequency, - 'RadioStationId': self.radio_station_id, - 'Bitrate': self.bitrate } # Add DRM config if present @@ -241,7 +233,6 @@ class StreamingChannel: channel_id=channel_id, provider=provider, is_radio=True, - audio_only=True, content_type="RADIO", quality="AUDIO", **kwargs @@ -293,7 +284,6 @@ class StreamingChannel: if any(radio_indicators): self.is_radio = True - self.audio_only = True # Update quality if not set if not self.quality or self.quality.upper() not in [q.value for q in Quality]: diff --git a/lib/streaming_providers/providers/magentaeu/provider.py b/lib/streaming_providers/providers/magentaeu/provider.py index 3d0c3fc..fd07589 100644 --- a/lib/streaming_providers/providers/magentaeu/provider.py +++ b/lib/streaming_providers/providers/magentaeu/provider.py @@ -204,6 +204,7 @@ class MagentaProvider(StreamingProvider): station_id = channel_data.get('station_id', '') channel_number = channel_data.get('channel_number', '') media_pid = channel_data.get('media_pid', '') + is_audio = channel_data.get('is_audio', False) # Build manifest script manifest_script_parts = [] @@ -235,6 +236,7 @@ class MagentaProvider(StreamingProvider): speed_up=True, content_type=CONTENT_TYPE_LIVE, country=self.country.upper(), + is_radio=is_audio, language=get_language(self.country), streaming_format=STREAMING_FORMAT_DASH ) diff --git a/resources/config/magentaeu_at_epg_mapping.json b/resources/config/magentaeu_at_epg_mapping.json index 0ace533..80022a8 100644 --- a/resources/config/magentaeu_at_epg_mapping.json +++ b/resources/config/magentaeu_at_epg_mapping.json @@ -247,9 +247,5 @@ "207381032335": { "epg_id": "tkmde_264", "name": "Sky Atlantic" - }, - "207381032291": { - "epg_id": "tkmde_31", - "name": "Sky Sport Austria 1" } } \ No newline at end of file