From c8cbfc7cb992fc14ddd21f5e67a0f9e1d35602d7 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 23 May 2024 13:17:14 +0200 Subject: [PATCH] feat: improved output of clearing the cache --- music_kraken/connection/cache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/music_kraken/connection/cache.py b/music_kraken/connection/cache.py index 004a6ba..0858815 100644 --- a/music_kraken/connection/cache.py +++ b/music_kraken/connection/cache.py @@ -6,6 +6,7 @@ from typing import List, Optional from functools import lru_cache import logging +from ..utils import output, BColors from ..utils.config import main_settings from ..utils.string_processing import fit_to_file_system @@ -204,9 +205,12 @@ class Cache: for path in self._dir.iterdir(): if path.is_dir(): for file in path.iterdir(): + output(f"Deleting file {file}", color=BColors.GREY) file.unlink() + output(f"Deleting folder {path}", color=BColors.HEADER) path.rmdir() else: + output(f"Deleting folder {path}", color=BColors.HEADER) path.unlink() self.cached_attributes.clear()