From 0ee572226ccc89c773b3190d83cd46e07f6f768b Mon Sep 17 00:00:00 2001 From: relikd Date: Mon, 4 Mar 2024 19:31:07 +0100 Subject: [PATCH] ref: insert separator before synthetic urls --- ipa_archive.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ipa_archive.py b/ipa_archive.py index 36775b6a..b42bd971 100755 --- a/ipa_archive.py +++ b/ipa_archive.py @@ -520,6 +520,9 @@ def export_json(): DB = CacheDB() url_map = DB.jsonUrlMap() maxUrlId = max(url_map.keys()) + # just a visual separator + maxUrlId += 1 + url_map[maxUrlId] = '---' submap = {} total = DB.count(done=1) with open(CACHE_DIR / 'ipa.json', 'w') as fp: @@ -579,6 +582,8 @@ def diskPath(uid: int, ext: str) -> Path: def printProgress(blocknum, bs, size): + if size == 0: + return percent = (blocknum * bs) / size done = "#" * int(40 * percent) print(f'\r[{done:<40}] {percent:.1%}', end='')