Skip to content

Commit

Permalink
Set stop event & mark track failed if HLS Session DRM fails to license
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaphoenix committed May 19, 2023
1 parent c9ecab4 commit c31c686
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions devine/core/manifests/hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,14 @@ def download_track(
session_drm = track.drm[0] # just use the first supported DRM system for now
if isinstance(session_drm, Widevine):
# license and grab content keys
if not license_widevine:
raise ValueError("license_widevine func must be supplied to use Widevine DRM")
license_widevine(session_drm)
try:
if not license_widevine:
raise ValueError("license_widevine func must be supplied to use Widevine DRM")
license_widevine(session_drm)
except Exception: # noqa
stop_event.set() # skip pending track downloads
progress(downloaded="[red]FAILED")
raise
else:
session_drm = None

Expand Down

0 comments on commit c31c686

Please sign in to comment.