From 017752c4d02d4286ee71d0e0306776509406f00f Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Wed, 15 May 2024 14:10:32 +0200 Subject: [PATCH] feat: better download output --- music_kraken/download/page_attributes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/music_kraken/download/page_attributes.py b/music_kraken/download/page_attributes.py index 878db65..c6cf68d 100644 --- a/music_kraken/download/page_attributes.py +++ b/music_kraken/download/page_attributes.py @@ -164,6 +164,7 @@ class Pages: def download(self, data_object: DataObject, genre: str, **kwargs) -> DownloadResult: # fetch the given object self.fetch_details(data_object) + output(f"\nDownloading {data_object.option_string}...", color=BColors.BOLD) # fetching all parent objects (e.g. if you only download a song) if not kwargs.get("fetched_upwards", False): @@ -260,14 +261,14 @@ class Pages: )) for target in song.target_collection: if target.exists: - output(f'- {target.file_path} {BColors.OKGREEN.value}[already exists]', color=BColors.GREY) + output(f'{target.file_path} {BColors.OKGREEN.value}[already exists]', color=BColors.GREY) r.found_on_disk += 1 - if self.download_options.download_again_if_found: + if not self.download_options.download_again_if_found: target.copy_content(tmp) else: target.create_path() - output(f'- {target.file_path}', color=BColors.GREY) + output(f'{target.file_path}', color=BColors.GREY) # this streams from every available source until something succeeds, setting the skip intervals to the values of the according source used_source: Optional[Source] = None