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:
@@ -184,6 +184,7 @@ class HLS:
|
||||
save_path: Path,
|
||||
save_dir: Path,
|
||||
stop_event: Event,
|
||||
skip_event: Event,
|
||||
progress: partial,
|
||||
session: Optional[Session] = None,
|
||||
proxy: Optional[str] = None,
|
||||
@@ -280,6 +281,10 @@ class HLS:
|
||||
finally:
|
||||
segment_key.put(newest_segment_key)
|
||||
|
||||
if skip_event.is_set():
|
||||
progress(downloaded="[yellow]SKIPPING")
|
||||
return 0
|
||||
|
||||
if not segment.uri.startswith(segment.base_uri):
|
||||
segment.uri = segment.base_uri + segment.uri
|
||||
|
||||
|
||||
Reference in New Issue
Block a user