Update to newest version

This commit is contained in:
UrloMythus
2025-06-15 19:20:01 +02:00
parent 9431837e6c
commit 7a1e96d8b1
9 changed files with 98 additions and 51 deletions

View File

@@ -137,8 +137,10 @@ def build_hls(mpd_dict: dict, request: Request, key_id: str = None, key: str = N
# Add video streams
for profile, playlist_url in video_profiles.values():
# Only add AUDIO attribute if there are audio profiles available
audio_attr = ',AUDIO="audio"' if audio_profiles else ""
hls.append(
f'#EXT-X-STREAM-INF:BANDWIDTH={profile["bandwidth"]},RESOLUTION={profile["width"]}x{profile["height"]},CODECS="{profile["codecs"]}",FRAME-RATE={profile["frameRate"]},AUDIO="audio"'
f'#EXT-X-STREAM-INF:BANDWIDTH={profile["bandwidth"]},RESOLUTION={profile["width"]}x{profile["height"]},CODECS="{profile["codecs"]}",FRAME-RATE={profile["frameRate"]}{audio_attr}'
)
hls.append(playlist_url)