torrent-downloader-react 1.1.3__tar.gz → 1.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- torrent-downloader-react-1.1.5/PKG-INFO +114 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/setup.py +1 -1
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader/server.py +18 -2
- torrent-downloader-react-1.1.5/torrent_downloader/static/assets/index-A4bJ2BBw.js +49 -0
- torrent-downloader-react-1.1.3/torrent_downloader/static/assets/index-DpeprjRI.css → torrent-downloader-react-1.1.5/torrent_downloader/static/assets/index-BKZnulWN.css +1 -1
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader/static/index.html +2 -2
- torrent-downloader-react-1.1.5/torrent_downloader_react.egg-info/PKG-INFO +114 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader_react.egg-info/SOURCES.txt +2 -2
- torrent-downloader-react-1.1.3/PKG-INFO +0 -164
- torrent-downloader-react-1.1.3/torrent_downloader/static/assets/index-BAUKkMK0.js +0 -49
- torrent-downloader-react-1.1.3/torrent_downloader_react.egg-info/PKG-INFO +0 -164
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/setup.cfg +0 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader/__init__.py +0 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader/static/vite.svg +0 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader_react.egg-info/requires.txt +0 -0
- {torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader_react.egg-info/top_level.txt +0 -0
@@ -0,0 +1,114 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: torrent-downloader-react
|
3
|
+
Version: 1.1.5
|
4
|
+
Summary: A modern, user-friendly torrent downloader application
|
5
|
+
Home-page: https://github.com/stevenbtc/torrent-downloader
|
6
|
+
Author: Steven Yan
|
7
|
+
Author-email: yulong.yan@uqconnect.edu.au
|
8
|
+
Project-URL: Bug Tracker, https://github.com/stevenbtc/torrent-downloader/issues
|
9
|
+
Project-URL: Documentation, https://github.com/stevenbtc/torrent-downloader#readme
|
10
|
+
Project-URL: Source Code, https://github.com/stevenbtc/torrent-downloader
|
11
|
+
Keywords: torrent,downloader,p2p,bittorrent,libtorrent
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
13
|
+
Classifier: Environment :: Web Environment
|
14
|
+
Classifier: Framework :: FastAPI
|
15
|
+
Classifier: Intended Audience :: End Users/Desktop
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
17
|
+
Classifier: Operating System :: OS Independent
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
24
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
25
|
+
Requires-Python: >=3.8
|
26
|
+
Description-Content-Type: text/markdown
|
27
|
+
|
28
|
+
# Torrent Downloader Web App
|
29
|
+
|
30
|
+
A modern, full-featured torrent downloader with a clean React interface and Python backend.
|
31
|
+
|
32
|
+
## Quick Start
|
33
|
+
|
34
|
+
```bash
|
35
|
+
pip install torrent-downloader-react
|
36
|
+
torrent-downloader-react # Opens in browser at http://127.0.0.1:8000
|
37
|
+
```
|
38
|
+
|
39
|
+
## System Requirements
|
40
|
+
|
41
|
+
- Python 3.8+
|
42
|
+
- Platform-specific dependencies:
|
43
|
+
- **Windows**: Microsoft Visual C++ Redistributable
|
44
|
+
- **macOS**: `brew install libtorrent-rasterbar`
|
45
|
+
- **Ubuntu/Debian**: `sudo apt-get install python3-libtorrent`
|
46
|
+
- **Fedora**: `sudo dnf install rb_libtorrent-python3`
|
47
|
+
|
48
|
+
## Features
|
49
|
+
|
50
|
+
- Modern, responsive UI with dark mode
|
51
|
+
- Real-time download progress monitoring
|
52
|
+
- Download speed and ETA tracking
|
53
|
+
- Easy magnet link handling
|
54
|
+
- Cross-platform support
|
55
|
+
- Concurrent downloads
|
56
|
+
|
57
|
+
## Usage
|
58
|
+
|
59
|
+
1. Start the application:
|
60
|
+
```bash
|
61
|
+
torrent-downloader-react
|
62
|
+
```
|
63
|
+
2. Open your browser at http://127.0.0.1:8000
|
64
|
+
3. Paste a magnet link and click "Add Torrent"
|
65
|
+
4. Monitor progress in the downloads list
|
66
|
+
5. Access completed downloads in your downloads folder
|
67
|
+
|
68
|
+
## Alternative Installation: Using Conda
|
69
|
+
|
70
|
+
```bash
|
71
|
+
conda create -n torrent-env python=3.11
|
72
|
+
conda activate torrent-env
|
73
|
+
conda install -c conda-forge libtorrent
|
74
|
+
pip install torrent-downloader-react
|
75
|
+
```
|
76
|
+
|
77
|
+
## Development
|
78
|
+
|
79
|
+
### Frontend (React)
|
80
|
+
```bash
|
81
|
+
# Install dependencies
|
82
|
+
cd torrent-downloader-react
|
83
|
+
npm install
|
84
|
+
|
85
|
+
# Start development server
|
86
|
+
npm run dev
|
87
|
+
```
|
88
|
+
|
89
|
+
### Backend (Python)
|
90
|
+
```bash
|
91
|
+
# Install dependencies
|
92
|
+
cd torrent-downloader-react/backend
|
93
|
+
pip install -r requirements.txt
|
94
|
+
|
95
|
+
# Start development server
|
96
|
+
python -m torrent_downloader.server
|
97
|
+
```
|
98
|
+
|
99
|
+
## API Documentation
|
100
|
+
|
101
|
+
The backend provides a RESTful API:
|
102
|
+
|
103
|
+
- `GET /api/torrents` - List all torrents
|
104
|
+
- `POST /api/torrents` - Add new torrent
|
105
|
+
- `DELETE /api/torrents/{id}` - Remove torrent
|
106
|
+
- `GET /api/torrents/{id}/status` - Get torrent status
|
107
|
+
|
108
|
+
## License
|
109
|
+
|
110
|
+
MIT License - See LICENSE file for details.
|
111
|
+
|
112
|
+
## Legal Notice
|
113
|
+
|
114
|
+
This software is intended for downloading legal torrents only. Users are responsible for compliance with applicable laws.
|
{torrent-downloader-react-1.1.3 → torrent-downloader-react-1.1.5}/torrent_downloader/server.py
RENAMED
@@ -98,8 +98,18 @@ class TorrentInfo(BaseModel):
|
|
98
98
|
async def add_torrent(request: TorrentRequest):
|
99
99
|
try:
|
100
100
|
# Add the torrent
|
101
|
-
|
101
|
+
try:
|
102
|
+
params = lt.parse_magnet_uri(request.magnet_link)
|
103
|
+
except Exception as e:
|
104
|
+
raise HTTPException(status_code=400, detail=f"Invalid magnet link format: {str(e)}")
|
105
|
+
|
102
106
|
params.save_path = str(DOWNLOAD_PATH)
|
107
|
+
|
108
|
+
# Check if torrent already exists with this hash
|
109
|
+
torrent_hash = str(params.info_hash)
|
110
|
+
if torrent_hash in active_torrents:
|
111
|
+
raise HTTPException(status_code=409, detail="A duplicate torrent is already being downloaded")
|
112
|
+
|
103
113
|
handle = session.add_torrent(params)
|
104
114
|
|
105
115
|
# Wait for metadata
|
@@ -113,7 +123,13 @@ async def add_torrent(request: TorrentRequest):
|
|
113
123
|
torrent_id = str(handle.info_hash())
|
114
124
|
active_torrents[torrent_id] = handle
|
115
125
|
|
116
|
-
|
126
|
+
# Get the torrent name for the response
|
127
|
+
torrent_name = handle.status().name
|
128
|
+
|
129
|
+
return {"id": torrent_id, "message": f"Torrent '{torrent_name}' added successfully"}
|
130
|
+
except HTTPException:
|
131
|
+
# Re-raise HTTP exceptions to preserve status codes
|
132
|
+
raise
|
117
133
|
except Exception as e:
|
118
134
|
raise HTTPException(status_code=400, detail=str(e))
|
119
135
|
|