Fix player instance setting (fix #260)

This commit is contained in:
Arkadiusz Fal
2022-08-16 23:16:35 +02:00
parent 30889619fd
commit 3a508b98ab
10 changed files with 42 additions and 25 deletions

View File

@@ -18,13 +18,10 @@ extension PlayerModel {
func loadAvailableStreams(_ video: Video) {
availableStreams = []
guard let playerInstance = InstancesModel.forPlayer ?? InstancesModel.all.first else {
return
}
guard let playerInstance = playerInstance else { return }
logger.info("loading streams from \(playerInstance.description)")
fetchStreams(playerInstance.anonymous.video(video.videoID), instance: playerInstance, video: video)
fetchStreams(playerAPI.video(video.videoID), instance: playerInstance, video: video)
}
private func fetchStreams(