feature/move_download_code_to_download #34
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user