mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 18:47:53 -06:00
refactor: share now_iso and the pack size label
This commit is contained in:
1 parent
9bb8d89acd
commit
f2fd49a9c9
5 files changed
+80
-70
No files matched your search
@@ -196,7 +196,7 @@ def manifest_mismatches(record: dict, install_dir: str | Path) -> list[str]:
|
||||
return found
|
||||
|
||||
|
||||
def _size(count: int) -> str:
|
||||
def size_text(count: int) -> str:
|
||||
if count >= 1024**3:
|
||||
return f"{count / 1024**3:.1f} GB"
|
||||
return f"{count / 1024**2:.0f} MB"
|
||||
@@ -230,8 +230,8 @@ def main() -> int:
|
||||
return 1
|
||||
for name, pack in record["packs"].items():
|
||||
print(
|
||||
f"{name:<44} download {_size(pack['download_size']):>8}"
|
||||
f" extracted {_size(pack['extracted_size']):>8}"
|
||||
f"{name:<44} download {size_text(pack['download_size']):>8}"
|
||||
f" extracted {size_text(pack['extracted_size']):>8}"
|
||||
f" {pack['files']:,} files {len(pack['assets'])} asset(s)"
|
||||
)
|
||||
mismatches = manifest_mismatches(record, args.install_dir)
|
||||
|
||||
Reference in new issue
Block a user