torrent-downloader-react 1.0.18__tar.gz → 1.0.19__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/PKG-INFO +1 -1
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/setup.py +1 -1
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader/server.py +15 -0
- torrent-downloader-react-1.0.19/torrent_downloader/static/assets/index-COG6Byoc.js +49 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader/static/index.html +1 -1
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader_react.egg-info/PKG-INFO +1 -1
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader_react.egg-info/SOURCES.txt +1 -1
- torrent-downloader-react-1.0.18/torrent_downloader/static/assets/index-BBEH9ldg.js +0 -49
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/setup.cfg +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader/__init__.py +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader/static/assets/index-CdUAChFP.css +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader/static/vite.svg +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader_react.egg-info/requires.txt +0 -0
- {torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader_react.egg-info/top_level.txt +0 -0
{torrent-downloader-react-1.0.18 → torrent-downloader-react-1.0.19}/torrent_downloader/server.py
RENAMED
@@ -75,6 +75,17 @@ DOWNLOAD_PATH = get_downloads_dir()
|
|
75
75
|
session = lt.session()
|
76
76
|
settings = session.get_settings()
|
77
77
|
settings['listen_interfaces'] = '0.0.0.0:6881'
|
78
|
+
settings['active_downloads'] = -1 # No limit
|
79
|
+
settings['active_seeds'] = -1 # No limit
|
80
|
+
settings['active_limit'] = -1 # No limit
|
81
|
+
settings['auto_manage_interval'] = 1 # Check every second
|
82
|
+
settings['active_tracker_limit'] = -1 # No limit
|
83
|
+
settings['enable_outgoing_utp'] = True
|
84
|
+
settings['enable_incoming_utp'] = True
|
85
|
+
settings['announce_to_all_tiers'] = True
|
86
|
+
settings['announce_to_all_trackers'] = True
|
87
|
+
settings['aio_threads'] = 8 # Number of async I/O threads
|
88
|
+
settings['checking_mem_usage'] = 128 # Memory usage for checking (in MB)
|
78
89
|
session.apply_settings(settings)
|
79
90
|
|
80
91
|
# Store active torrents
|
@@ -88,6 +99,7 @@ class TorrentInfo(BaseModel):
|
|
88
99
|
name: str
|
89
100
|
progress: float
|
90
101
|
download_speed: float
|
102
|
+
upload_speed: float
|
91
103
|
state: str
|
92
104
|
total_size: int
|
93
105
|
downloaded: int
|
@@ -139,6 +151,7 @@ async def list_torrents() -> List[TorrentInfo]:
|
|
139
151
|
name=handle.name(),
|
140
152
|
progress=status.progress * 100,
|
141
153
|
download_speed=status.download_rate / 1024, # Convert to KB/s
|
154
|
+
upload_speed=status.upload_rate / 1024, # Convert to KB/s
|
142
155
|
state=state_str,
|
143
156
|
total_size=status.total_wanted,
|
144
157
|
downloaded=status.total_wanted_done
|
@@ -177,6 +190,8 @@ async def pause_torrent(torrent_id: str):
|
|
177
190
|
|
178
191
|
handle = active_torrents[torrent_id]
|
179
192
|
handle.pause()
|
193
|
+
# Force an immediate pause
|
194
|
+
handle.flush_cache()
|
180
195
|
return {"message": "Torrent paused successfully"}
|
181
196
|
|
182
197
|
@app.post("/api/torrent/{torrent_id}/resume")
|