diff --git a/src/music_kraken/pages/support_classes/download_result.py b/src/music_kraken/pages/support_classes/download_result.py index 2a63839..423c916 100644 --- a/src/music_kraken/pages/support_classes/download_result.py +++ b/src/music_kraken/pages/support_classes/download_result.py @@ -14,6 +14,10 @@ class DownloadResult: def success(self) -> int: return self.total - self.fail + @property + def success_percentage(self) -> float: + return self.success / self.total + @property def fatal_error(self) -> bool: return self.error_message is not None @@ -31,4 +35,4 @@ class DownloadResult: def __repr__(self): if self.fatal_error: return self.error_message - return f"{self.fail} from {self.total} downloads failed." + return f"({int(self.success_percentage*100)}%) {self.fail} from {self.total} downloads failed."