Skip to content

Commit

Permalink
Fix missing default
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Dec 10, 2023
1 parent b4aeaa9 commit dc97004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seplis_play_server/routes/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'):
Expand Down

0 comments on commit dc97004

Please sign in to comment.