mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 09:20:31 -07:00
fix: Properly parse null values api (#230)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
492857a8ad
commit
3d82207694
2 changed files with 4 additions and 5 deletions
|
|
@ -104,7 +104,7 @@ class VideoStream {
|
|||
final MediaStreamsModel? mediaStreamsModel;
|
||||
|
||||
AudioStreamModel? get currentAudioStream {
|
||||
if (audioStreamIndex == -1) {
|
||||
if (audioStreamIndex == -1 || audioStreamIndex == null) {
|
||||
return null;
|
||||
}
|
||||
return mediaStreamsModel?.audioStreams.firstWhereOrNull(
|
||||
|
|
@ -112,7 +112,7 @@ class VideoStream {
|
|||
}
|
||||
|
||||
SubStreamModel? get currentSubStream {
|
||||
if (subtitleStreamIndex == -1) {
|
||||
if (subtitleStreamIndex == -1 || subtitleStreamIndex == null) {
|
||||
return null;
|
||||
}
|
||||
return mediaStreamsModel?.subStreams.firstWhereOrNull(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue