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,6 +446,7 @@ class HLS:
|
||||||
elif not encryption_data or encryption_data[1] != key:
|
elif not encryption_data or encryption_data[1] != key:
|
||||||
drm = HLS.get_drm(key, proxy)
|
drm = HLS.get_drm(key, proxy)
|
||||||
if isinstance(drm, Widevine):
|
if isinstance(drm, Widevine):
|
||||||
|
try:
|
||||||
if map_data:
|
if map_data:
|
||||||
track_kid = track.get_key_id(map_data[1])
|
track_kid = track.get_key_id(map_data[1])
|
||||||
else:
|
else:
|
||||||
|
@ -453,6 +454,10 @@ class HLS:
|
||||||
progress(downloaded="LICENSING")
|
progress(downloaded="LICENSING")
|
||||||
license_widevine(drm, track_kid=track_kid)
|
license_widevine(drm, track_kid=track_kid)
|
||||||
progress(downloaded="[yellow]LICENSED")
|
progress(downloaded="[yellow]LICENSED")
|
||||||
|
except Exception: # noqa
|
||||||
|
DOWNLOAD_CANCELLED.set() # skip pending track downloads
|
||||||
|
progress(downloaded="[red]FAILED")
|
||||||
|
raise
|
||||||
encryption_data = (i, key, drm)
|
encryption_data = (i, key, drm)
|
||||||
|
|
||||||
# TODO: This wont work as we already downloaded
|
# TODO: This wont work as we already downloaded
|
||||||
|
|
Loading…
Reference in New Issue