Implement epg

This commit is contained in:
Nirvana
2025-12-05 11:31:50 +01:00
parent a8a511bd29
commit e62a9fedde
3 changed files with 2 additions and 14 deletions
@@ -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]:
@@ -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
)
@@ -247,9 +247,5 @@
"207381032335": {
"epg_id": "tkmde_264",
"name": "Sky Atlantic"
},
"207381032291": {
"epg_id": "tkmde_31",
"name": "Sky Sport Austria 1"
}
}