Minor update to main script.

This commit is contained in:
Mikaël Capelle 2025-02-22 18:27:48 +01:00
parent a16774b5c0
commit ef4b8e12b9

View File

@ -38,7 +38,10 @@ def fetch_chapters(
ignore: frozenset[str] = frozenset(), ignore: frozenset[str] = frozenset(),
): ):
manga = fetcher.find_manga(name) manga = fetcher.find_manga(name)
assert manga is not None
if manga is None:
print(f"Manga {name} not found, skipping.")
return
chapters = fetcher.list_chapters(manga) chapters = fetcher.list_chapters(manga)
print( print(
@ -151,9 +154,9 @@ def main() -> None:
case "fetch-all": case "fetch-all":
folder = args.output or Path("scans") folder = args.output or Path("scans")
for path in folder.iterdir(): for path in folder.iterdir():
print(f"Retrieving scan for {path.name}... ")
if not path.is_dir(): if not path.is_dir():
continue continue
print(f"Retrieving scan for {path.name}... ")
fetch_chapters(fetcher, path.stem, path) fetch_chapters(fetcher, path.stem, path)