forked from DRMTalks/devine
Mark DASH and URL tracks as Decrypting when using shaka
DASH and normal URL downloads now both decrypt one large single or merged file after all downloads are finished. This leaves a bit of a "pause" between progress bar movement which looks a bit odd. So mark the track as being in a Decrypting state.
This commit is contained in:
parent
a45c784569
commit
681d69d5e5
|
@ -918,10 +918,12 @@ class dl:
|
|||
progress(downloaded="Downloaded")
|
||||
|
||||
if drm:
|
||||
progress(downloaded="Decrypting", completed=0, total=100)
|
||||
drm.decrypt(save_path)
|
||||
track.drm = None
|
||||
if callable(track.OnDecrypted):
|
||||
track.OnDecrypted(track)
|
||||
progress(downloaded="Decrypted", completed=100)
|
||||
except KeyboardInterrupt:
|
||||
self.DL_POOL_STOP.set()
|
||||
progress(downloaded="[yellow]STOPPED")
|
||||
|
|
|
@ -523,10 +523,12 @@ class DASH:
|
|||
|
||||
if drm:
|
||||
# TODO: What if the manifest does not mention DRM, but has DRM
|
||||
progress(downloaded="Decrypting", completed=0, total=100)
|
||||
drm.decrypt(save_path)
|
||||
track.drm = None
|
||||
if callable(track.OnDecrypted):
|
||||
track.OnDecrypted(track)
|
||||
progress(downloaded="Decrypted", completed=100)
|
||||
|
||||
track.path = save_path
|
||||
save_dir.rmdir()
|
||||
|
|
Loading…
Reference in New Issue