From 30abe26321db1d5490c000d8ec2fea347d9bdd69 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Mon, 29 Jan 2024 17:02:30 +0000 Subject: [PATCH] Improve caching of keys to vaults log --- devine/commands/dl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devine/commands/dl.py b/devine/commands/dl.py index 9d234de..1827a06 100644 --- a/devine/commands/dl.py +++ b/devine/commands/dl.py @@ -761,8 +761,11 @@ class dl: # So we re-add the keys from vaults earlier overwriting blanks or removed KIDs data. drm.content_keys.update(from_vaults) - cached_keys = self.vaults.add_keys(drm.content_keys) - self.log.info(f" + Newly added to {cached_keys}/{len(drm.content_keys)} Vaults") + successful_caches = self.vaults.add_keys(drm.content_keys) + self.log.info( + f"Cached {len(drm.content_keys)} Key{'' if len(drm.content_keys) == 1 else 's'} to " + f"{successful_caches}/{len(self.vaults)} Vaults" + ) break # licensing twice will be unnecessary if track_kid and track_kid not in drm.content_keys: