mirror of
https://github.com/yattee/yattee.git
synced 2025-04-29 00:10:34 +05:30
Fix possible crash
This commit is contained in:
parent
09de2cbbab
commit
fa15a18374
@ -445,14 +445,16 @@ final class PlayerModel: ObservableObject {
|
|||||||
changeActiveBackend(from: activeBackend, to: backend)
|
changeActiveBackend(from: activeBackend, to: backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let stream = ((availableStreams.count == 1 && availableStreams.first!.isLocal) ? availableStreams.first : nil) ?? streamByQualityProfile else {
|
guard let stream = (((availableStreams.count == 1 && availableStreams.first!.isLocal) ? availableStreams.first : nil) ?? streamByQualityProfile),
|
||||||
|
let currentVideo
|
||||||
|
else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
streamSelection = stream
|
streamSelection = stream
|
||||||
playStream(
|
playStream(
|
||||||
stream,
|
stream,
|
||||||
of: currentVideo!,
|
of: currentVideo,
|
||||||
preservingTime: !currentItem.playbackTime.isNil
|
preservingTime: !currentItem.playbackTime.isNil
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user