feat: Implement TorrentDownloader class with libtorrent and webtorrent CLI support

- Added TorrentDownloader class for robust torrent downloading.
- Integrated libtorrent for torrent management when available.
- Implemented fallback to webtorrent CLI for downloading torrents.
- Added methods for downloading via libtorrent and webtorrent CLI.
- Included progress tracking and callback functionality.
- Updated pyproject.toml and uv.lock to include libtorrent as a dependency.
- Created unit tests for TorrentDownloader and legacy function for backward compatibility.
This commit is contained in:
Benexl
2025-07-24 23:37:00 +03:00
parent 4bbfe221f2
commit 5246a2fc4b
4 changed files with 599 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ dependencies = [
"click>=8.1.7",
"httpx>=0.28.1",
"inquirerpy>=0.3.4",
"libtorrent>=2.0.11",
"lxml>=6.0.0",
"pycryptodome>=3.21.0",
"pydantic>=2.11.7",