1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30

Fix issue with streams list duplicates

This commit is contained in:
Arkadiusz Fal 2023-05-20 23:47:14 +02:00
parent 5383cf0e90
commit 34a05433d5
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ extension PlayerModel {
guard let playerInstance = self.playerInstance else { return }
let streamsInstance = video.streams.compactMap(\.instance).first
if video.streams.isEmpty || streamsInstance != playerInstance {
if video.streams.isEmpty || streamsInstance.isNil || streamsInstance!.apiURLString != playerInstance.apiURLString {
self.loadAvailableStreams(video) { [weak self] _ in
self?.videoBeingOpened = nil
}

View File

@ -41,7 +41,7 @@ extension PlayerModel {
self.logger.info("ignoring loaded streams from \(instance.description) as current video has changed")
return
}
self.availableStreams += self.streamsWithInstance(instance: instance, streams: video.streams)
self.availableStreams = self.streamsWithInstance(instance: instance, streams: video.streams)
} else {
self.logger.critical("no streams available from \(instance.description)")
}