made the download results prettier
This commit is contained in:
parent
545cf98f79
commit
46eab5cbb0
@ -65,7 +65,6 @@ def cli():
|
||||
r = search.download_chosen()
|
||||
print()
|
||||
print(r)
|
||||
print(r._error_message_list)
|
||||
return True
|
||||
|
||||
url = re.match(URL_REGGEX, query)
|
||||
|
@ -42,7 +42,9 @@ class DownloadResult:
|
||||
def __str__(self):
|
||||
if self.fatal_error:
|
||||
return self.error_message
|
||||
head = f"({int(self.success_percentage*100)}%) {self.fail} from {self.total} downloads failed."
|
||||
head = f"{self.fail} from {self.total} downloads failed:\n" \
|
||||
f"successrate:\t{int(self.success_percentage*100)}%\n" \
|
||||
f"failrate:\t\t{int(self.failure_percentage*100)}%"
|
||||
|
||||
if self.failure_percentage <= SHOW_DOWNLOAD_ERRORS_THRESHOLD:
|
||||
return head
|
||||
|
Loading…
Reference in New Issue
Block a user