mirror of https://github.com/devine-dl/devine.git
Set stop event & mark track failed if new HLS DRM fails to license
This commit is contained in:
parent
8de3a95c6b
commit
2635d06d58
|
@ -446,13 +446,18 @@ class HLS:
|
|||
elif not encryption_data or encryption_data[1] != key:
|
||||
drm = HLS.get_drm(key, proxy)
|
||||
if isinstance(drm, Widevine):
|
||||
if map_data:
|
||||
track_kid = track.get_key_id(map_data[1])
|
||||
else:
|
||||
track_kid = None
|
||||
progress(downloaded="LICENSING")
|
||||
license_widevine(drm, track_kid=track_kid)
|
||||
progress(downloaded="[yellow]LICENSED")
|
||||
try:
|
||||
if map_data:
|
||||
track_kid = track.get_key_id(map_data[1])
|
||||
else:
|
||||
track_kid = None
|
||||
progress(downloaded="LICENSING")
|
||||
license_widevine(drm, track_kid=track_kid)
|
||||
progress(downloaded="[yellow]LICENSED")
|
||||
except Exception: # noqa
|
||||
DOWNLOAD_CANCELLED.set() # skip pending track downloads
|
||||
progress(downloaded="[red]FAILED")
|
||||
raise
|
||||
encryption_data = (i, key, drm)
|
||||
|
||||
# TODO: This wont work as we already downloaded
|
||||
|
|
Loading…
Reference in New Issue