From 4594dc5189dd8239fafd1691f88cccc9b43a7104 Mon Sep 17 00:00:00 2001 From: MasutaYunikon Date: Mon, 23 Mar 2026 06:08:48 +0100 Subject: [PATCH] fix: use magnet before torrent --- server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.ts b/server/index.ts index d644a8c..d1b1d0f 100644 --- a/server/index.ts +++ b/server/index.ts @@ -545,7 +545,7 @@ app.get('/api/series/:id', requireAuth, async (req, res) => { // ── Download ─────────────────────────────────────────────────── app.post('/api/download', requireAuth, async (req, res) => { - const url = req.body.torrent_url ?? req.body.magnet + const url = req.body.magnet ?? req.body.torrent_url if (!url) { res.status(400).json({ error: 'torrent_url ou magnet requis' }); return } const results = await dispatchDownload(url) res.status(results.every((r: any) => r.ok) ? 200 : 207).json({ results })