Remove unnecessary sleep calls at start of download threads

This commit is contained in:
rlaphoenix 2023-02-28 16:38:10 +00:00
parent b6d3c8368a
commit acead803bd
3 changed files with 1 additions and 4 deletions

View File

@ -700,7 +700,6 @@ class dl:
prepare_drm: Callable,
progress: partial
):
time.sleep(1)
if self.DL_POOL_STOP.is_set():
return

View File

@ -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

View File

@ -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