feature/move_download_code_to_download #34

Merged
Hazel merged 18 commits from feature/move_download_code_to_download into experimental 2024-05-15 15:24:30 +00:00
Showing only changes of commit 017752c4d0 - Show all commits

View File

@ -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