fix(cli): wire verbose flag through entry point

Extract argparse into main() and point console script at it.
The -v/--verbose flag was dead because the entry point called
run() directly, bypassing the __main__ argparse block entirely.
This commit is contained in:
AlexKucera committed 2026-06-04 11:20:02 +02:00
1 parent c4ee24bb28
commit 722413a45b
5 files changed
+60 -3

No files matched your search

+6 -1
View File
@@ -192,7 +192,8 @@ def run(
return 130
if __name__ == "__main__":
def main() -> None:
"""CLI entry point — parse args and run the download pipeline."""
import argparse
parser = argparse.ArgumentParser(description="Download audiobooks from Libro.fm")
@@ -225,3 +226,7 @@ if __name__ == "__main__":
limit=args.limit,
workers=args.workers,
))
if __name__ == "__main__":
main()