From 681d69d5e55deec99cdbf057d21612f0030e3342 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Tue, 16 May 2023 22:01:07 +0100 Subject: [PATCH] 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. --- devine/commands/dl.py | 2 ++ devine/core/manifests/dash.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/devine/commands/dl.py b/devine/commands/dl.py index 5341ca7..ac9b3f8 100644 --- a/devine/commands/dl.py +++ b/devine/commands/dl.py @@ -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") diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index 27e2174..acced29 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -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()