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:
@@ -918,10 +918,12 @@ class dl:
|
|||||||
progress(downloaded="Downloaded")
|
progress(downloaded="Downloaded")
|
||||||
|
|
||||||
if drm:
|
if drm:
|
||||||
|
progress(downloaded="Decrypting", completed=0, total=100)
|
||||||
drm.decrypt(save_path)
|
drm.decrypt(save_path)
|
||||||
track.drm = None
|
track.drm = None
|
||||||
if callable(track.OnDecrypted):
|
if callable(track.OnDecrypted):
|
||||||
track.OnDecrypted(track)
|
track.OnDecrypted(track)
|
||||||
|
progress(downloaded="Decrypted", completed=100)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
self.DL_POOL_STOP.set()
|
self.DL_POOL_STOP.set()
|
||||||
progress(downloaded="[yellow]STOPPED")
|
progress(downloaded="[yellow]STOPPED")
|
||||||
|
|||||||
@@ -523,10 +523,12 @@ class DASH:
|
|||||||
|
|
||||||
if drm:
|
if drm:
|
||||||
# TODO: What if the manifest does not mention DRM, but has DRM
|
# TODO: What if the manifest does not mention DRM, but has DRM
|
||||||
|
progress(downloaded="Decrypting", completed=0, total=100)
|
||||||
drm.decrypt(save_path)
|
drm.decrypt(save_path)
|
||||||
track.drm = None
|
track.drm = None
|
||||||
if callable(track.OnDecrypted):
|
if callable(track.OnDecrypted):
|
||||||
track.OnDecrypted(track)
|
track.OnDecrypted(track)
|
||||||
|
progress(downloaded="Decrypted", completed=100)
|
||||||
|
|
||||||
track.path = save_path
|
track.path = save_path
|
||||||
save_dir.rmdir()
|
save_dir.rmdir()
|
||||||
|
|||||||
Reference in New Issue
Block a user