mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
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)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
streamSelection = stream
|
||||
playStream(
|
||||
stream,
|
||||
of: currentVideo!,
|
||||
of: currentVideo,
|
||||
preservingTime: !currentItem.playbackTime.isNil
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user