mirror of
				https://github.com/yattee/yattee.git
				synced 2025-11-03 22:22:02 +00:00 
			
		
		
		
	Fix issue with streams list duplicates
This commit is contained in:
		@@ -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
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -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)")
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user