fix for verbose logging with progress bar overlap
This commit is contained in:
parent
280a6f7e41
commit
c78f913c94
1 changed files with 4 additions and 3 deletions
|
@ -12,7 +12,8 @@ def download_chapter(image_urls, chapter_path, download_wait, verbose):
|
||||||
for img_num, img in enumerate(image_urls, 1):
|
for img_num, img in enumerate(image_urls, 1):
|
||||||
# set image path
|
# set image path
|
||||||
image_path = Path(f"{chapter_path}/{img_num:03d}")
|
image_path = Path(f"{chapter_path}/{img_num:03d}")
|
||||||
# show progress bar
|
# show progress bar if verbose logging is not active
|
||||||
|
if not verbose:
|
||||||
utils.progress_bar(img_num, total_img, verbose)
|
utils.progress_bar(img_num, total_img, verbose)
|
||||||
counter = 1
|
counter = 1
|
||||||
while counter <= 3:
|
while counter <= 3:
|
||||||
|
@ -36,7 +37,7 @@ def download_chapter(image_urls, chapter_path, download_wait, verbose):
|
||||||
|
|
||||||
# verbose logging
|
# verbose logging
|
||||||
if verbose:
|
if verbose:
|
||||||
print(f"INFO: Downloaded image {img_num}")
|
print(f"INFO: Downloaded image {img_num}/{total_img}")
|
||||||
# write image
|
# write image
|
||||||
try:
|
try:
|
||||||
with image_path.open("wb") as file:
|
with image_path.open("wb") as file:
|
||||||
|
|
Loading…
Reference in a new issue