diff --git a/Model/Player/PlayerQueue.swift b/Model/Player/PlayerQueue.swift index 462032e5..f28f4ab2 100644 --- a/Model/Player/PlayerQueue.swift +++ b/Model/Player/PlayerQueue.swift @@ -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 } diff --git a/Model/Player/PlayerStreams.swift b/Model/Player/PlayerStreams.swift index d66b23c3..72383746 100644 --- a/Model/Player/PlayerStreams.swift +++ b/Model/Player/PlayerStreams.swift @@ -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)") }