Alter behaviour of --skip-dl to allow DRM licensing
Most people used --skip-dl just to license the DRM pre-v1.3.0. Which makes sense, --skip-dl is otherwise a pointless feature. I've fixed it so that --skip-dl worked like before, allowing license calls, while still supporting the new per-segment features post-v1.3.0. Fixes #37
This commit is contained in:
@@ -283,6 +283,7 @@ class DASH:
|
||||
save_path: Path,
|
||||
save_dir: Path,
|
||||
stop_event: Event,
|
||||
skip_event: Event,
|
||||
progress: partial,
|
||||
session: Optional[Session] = None,
|
||||
proxy: Optional[str] = None,
|
||||
@@ -458,6 +459,10 @@ class DASH:
|
||||
else:
|
||||
drm = None
|
||||
|
||||
if skip_event.is_set():
|
||||
progress(downloaded="[yellow]SKIPPED")
|
||||
return
|
||||
|
||||
def download_segment(filename: str, segment: tuple[str, Optional[str]]) -> int:
|
||||
if stop_event.is_set():
|
||||
# the track already started downloading, but another failed or was stopped
|
||||
|
||||
Reference in New Issue
Block a user