change logging of skipped chapters and fix error list
All checks were successful
ci/woodpecker/push/tests Pipeline was successful
All checks were successful
ci/woodpecker/push/tests Pipeline was successful
This commit is contained in:
parent
7fb45b96f7
commit
ae42a19aed
2 changed files with 12 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,6 +9,7 @@ downloads/
|
|||
__pycache__/
|
||||
.pytest_cache/
|
||||
chaps.txt
|
||||
mangas.txt
|
||||
.idea/
|
||||
venv
|
||||
|
||||
|
|
|
@ -164,10 +164,13 @@ class MangaDLP:
|
|||
return_infos = self.archive_chapter(return_infos["chapter_path"])
|
||||
error_chapters.append(return_infos.get("error"))
|
||||
skipped_chapters.append(return_infos.get("skipped"))
|
||||
|
||||
# check if chapter was skipped
|
||||
try:
|
||||
return_infos["skipped"]
|
||||
# chapter was not skipped
|
||||
except KeyError:
|
||||
# done with chapter
|
||||
print("INFO: Done with chapter")
|
||||
print("-----------------------------------------\n")
|
||||
print("INFO: Done with chapter\n")
|
||||
|
||||
# done with manga
|
||||
print(f"{print_divider}")
|
||||
|
@ -176,6 +179,10 @@ class MangaDLP:
|
|||
skipped_chapters = list(filter(None, skipped_chapters))
|
||||
if len(skipped_chapters) >= 1:
|
||||
print(f"INFO: Skipped chapters:\n{', '.join(skipped_chapters)}")
|
||||
# filter error list
|
||||
error_chapters = list(filter(None, error_chapters))
|
||||
if len(error_chapters) >= 1:
|
||||
print(f"INFO: Chapters with errors:\n{', '.join(error_chapters)}")
|
||||
print(f"{print_divider}\n")
|
||||
|
||||
# once called per chapter
|
||||
|
|
Loading…
Reference in a new issue