Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -25,27 +25,34 @@ def get_super_trackers():
|
|
| 25 |
except: continue
|
| 26 |
return ",".join(list(set([t.strip() for t in trackers if t.strip()])))
|
| 27 |
except:
|
| 28 |
-
return "udp://tracker.opentrackr.org:1337/announce,udp://tracker.internetwarriors.net:1337/announce"
|
| 29 |
|
| 30 |
def do_archive(u_id, magnet):
|
| 31 |
archive_dir = f"/app/temp_{u_id}"
|
| 32 |
os.makedirs(archive_dir, exist_ok=True)
|
| 33 |
print(f"[ENGINE] 🚀 Forcing metadata resolution for: {u_id}", flush=True)
|
| 34 |
|
| 35 |
-
# 1. THE AGGRESSIVE DOWNLOAD COMMAND
|
| 36 |
cmd = [
|
| 37 |
'aria2c', '--dir', archive_dir,
|
| 38 |
'--bt-tracker=' + get_super_trackers(),
|
| 39 |
-
'--
|
| 40 |
-
'--bt-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
'--bt-max-peers=0', # Unlimited peers
|
| 42 |
'--bt-request-peer-speed-limit=0', # No throttling
|
| 43 |
-
'--split=64',
|
|
|
|
| 44 |
'--file-allocation=falloc',
|
| 45 |
'--seed-time=0',
|
| 46 |
-
'--bt-stop-timeout=300', # Give up after 5 mins of 0 speed
|
| 47 |
'--summary-interval=10',
|
| 48 |
-
'--dht-entry-point=dht.transmissionbt.com:6881', # Public DHT node
|
| 49 |
magnet
|
| 50 |
]
|
| 51 |
|
|
|
|
| 25 |
except: continue
|
| 26 |
return ",".join(list(set([t.strip() for t in trackers if t.strip()])))
|
| 27 |
except:
|
| 28 |
+
return "udp://tracker.opentrackr.org:1337/announce,udp://tracker.internetwarriors.net:1337/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce"
|
| 29 |
|
| 30 |
def do_archive(u_id, magnet):
|
| 31 |
archive_dir = f"/app/temp_{u_id}"
|
| 32 |
os.makedirs(archive_dir, exist_ok=True)
|
| 33 |
print(f"[ENGINE] 🚀 Forcing metadata resolution for: {u_id}", flush=True)
|
| 34 |
|
| 35 |
+
# 1. THE AGGRESSIVE DOWNLOAD COMMAND (Super-Powered Update)
|
| 36 |
cmd = [
|
| 37 |
'aria2c', '--dir', archive_dir,
|
| 38 |
'--bt-tracker=' + get_super_trackers(),
|
| 39 |
+
'--bt-tracker-connect-timeout=10',
|
| 40 |
+
'--bt-tracker-timeout=10',
|
| 41 |
+
'--bt-stop-timeout=300', # Give up after 5 mins of 0 speed
|
| 42 |
+
'--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
| 43 |
+
'--enable-dht=true',
|
| 44 |
+
'--dht-entry-point=dht.transmissionbt.com:6881', # Public DHT node fix
|
| 45 |
+
'--bt-enable-lpd=true',
|
| 46 |
+
'--enable-peer-exchange=true',
|
| 47 |
+
'--bt-force-encryption=true',
|
| 48 |
+
'--bt-min-crypto-level=arc4',
|
| 49 |
'--bt-max-peers=0', # Unlimited peers
|
| 50 |
'--bt-request-peer-speed-limit=0', # No throttling
|
| 51 |
+
'--split=64',
|
| 52 |
+
'--max-connection-per-server=16',
|
| 53 |
'--file-allocation=falloc',
|
| 54 |
'--seed-time=0',
|
|
|
|
| 55 |
'--summary-interval=10',
|
|
|
|
| 56 |
magnet
|
| 57 |
]
|
| 58 |
|