From dc9700408d9c58054e6460245e3203ce99681c7d Mon Sep 17 00:00:00 2001 From: Thomas Erlang Date: Sun, 10 Dec 2023 17:20:51 +0100 Subject: [PATCH] Fix missing default --- seplis_play_server/routes/sources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seplis_play_server/routes/sources.py b/seplis_play_server/routes/sources.py index c97b50a..b8b86af 100644 --- a/seplis_play_server/routes/sources.py +++ b/seplis_play_server/routes/sources.py @@ -12,7 +12,7 @@ class Source_stream_model(BaseModel): title: str | None language: str | None index: int - group_index: int | None + group_index: int | None = None codec: str | None default: bool = False forced: bool = False @@ -74,7 +74,7 @@ async def get_sources(metadata = Depends(get_metadata)): forced=stream.get('disposition', {}).get('forced', 0) == 1, ) if stream['codec_type'] == 'audio': - d.group_index = len(d.audio) + s.group_index = len(d.audio) d.audio.append(s) elif stream['codec_type'] == 'subtitle': if stream['codec_name'] not in ('dvd_subtitle', 'hdmv_pgs_subtitle'):