Unsafe fixes.

This commit is contained in:
2026-05-25 02:12:31 +00:00
parent 95081ca50e
commit 54a4b57230
20 changed files with 55 additions and 81 deletions
+2 -3
View File
@@ -164,8 +164,7 @@ def scan_torrent_directories(paths: list[str]) -> Iterator[Path]:
for dir_path in glob.glob(pattern):
torrent_dir = Path(dir_path)
if torrent_dir.is_dir():
for torrent_file in torrent_dir.glob("*.torrent"):
yield torrent_file
yield from torrent_dir.glob("*.torrent")
def find_torrents_with_tracker(
@@ -203,7 +202,7 @@ def format_size(size_bytes: int | None) -> str:
return f"{size_bytes:.2f} PB"
def main():
def main() -> None:
"""Main entry point for the torrent scanner."""
parser = argparse.ArgumentParser(
description="Scan and manage torrent files",