mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	Remove unnecessary sleep calls at start of download threads
This commit is contained in:
		
							parent
							
								
									b6d3c8368a
								
							
						
					
					
						commit
						acead803bd
					
				@ -700,7 +700,6 @@ class dl:
 | 
			
		||||
        prepare_drm: Callable,
 | 
			
		||||
        progress: partial
 | 
			
		||||
    ):
 | 
			
		||||
        time.sleep(1)
 | 
			
		||||
        if self.DL_POOL_STOP.is_set():
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -448,7 +448,6 @@ class DASH:
 | 
			
		||||
            state_event = Event()
 | 
			
		||||
 | 
			
		||||
            def download_segment(filename: str, segment: tuple[str, Optional[str]]) -> int:
 | 
			
		||||
                time.sleep(0.1)
 | 
			
		||||
                if state_event.is_set():
 | 
			
		||||
                    return 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -214,8 +214,7 @@ class HLS:
 | 
			
		||||
 | 
			
		||||
        state_event = Event()
 | 
			
		||||
 | 
			
		||||
        def download_segment(filename: str, segment, init_data: Queue, segment_key: Queue) -> int:
 | 
			
		||||
            time.sleep(0.1)
 | 
			
		||||
        def download_segment(filename: str, segment: m3u8.Segment, init_data: Queue, segment_key: Queue) -> int:
 | 
			
		||||
            if state_event.is_set():
 | 
			
		||||
                return 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user