From 03c012f88eb5bc052e2260c7383e2af439a26da2 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 17 May 2023 02:07:38 +0100 Subject: [PATCH] Move the Downloaded msg after Decrypt mgs in DASH/URL downloads --- devine/commands/dl.py | 4 ++-- devine/core/manifests/dash.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/devine/commands/dl.py b/devine/commands/dl.py index ac9b3f8..0a764bb 100644 --- a/devine/commands/dl.py +++ b/devine/commands/dl.py @@ -915,8 +915,6 @@ class dl: track.path = save_path - progress(downloaded="Downloaded") - if drm: progress(downloaded="Decrypting", completed=0, total=100) drm.decrypt(save_path) @@ -924,6 +922,8 @@ class dl: if callable(track.OnDecrypted): track.OnDecrypted(track) progress(downloaded="Decrypted", completed=100) + + progress(downloaded="Downloaded") 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 4f409cd..85b9a66 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -514,10 +514,7 @@ class DASH: f.write(segment_file.read_bytes()) segment_file.unlink() - progress(downloaded="Downloaded") - 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 @@ -528,6 +525,8 @@ class DASH: track.path = save_path save_dir.rmdir() + progress(downloaded="Downloaded") + @staticmethod def _get( item: str,