mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix issue with streams list duplicates
This commit is contained in:
parent
5383cf0e90
commit
34a05433d5
@ -88,7 +88,7 @@ extension PlayerModel {
|
|||||||
guard let playerInstance = self.playerInstance else { return }
|
guard let playerInstance = self.playerInstance else { return }
|
||||||
let streamsInstance = video.streams.compactMap(\.instance).first
|
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.loadAvailableStreams(video) { [weak self] _ in
|
||||||
self?.videoBeingOpened = nil
|
self?.videoBeingOpened = nil
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ extension PlayerModel {
|
|||||||
self.logger.info("ignoring loaded streams from \(instance.description) as current video has changed")
|
self.logger.info("ignoring loaded streams from \(instance.description) as current video has changed")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
self.availableStreams += self.streamsWithInstance(instance: instance, streams: video.streams)
|
self.availableStreams = self.streamsWithInstance(instance: instance, streams: video.streams)
|
||||||
} else {
|
} else {
|
||||||
self.logger.critical("no streams available from \(instance.description)")
|
self.logger.critical("no streams available from \(instance.description)")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user