From 5d7ddbd208a15b4fec1aee5f296c4ea99d3ff2bc Mon Sep 17 00:00:00 2001 From: Elias Benbourenane Date: Wed, 29 Jan 2025 23:02:28 -0500 Subject: [PATCH] fix: Don't immediately download torrents with the magnet link handler (#28) --- pkg/qbit/server/templates/download.html | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/qbit/server/templates/download.html b/pkg/qbit/server/templates/download.html index 795e44e..0995925 100644 --- a/pkg/qbit/server/templates/download.html +++ b/pkg/qbit/server/templates/download.html @@ -90,17 +90,12 @@ } }); - // Read the URL parameters for a magnet link and add it to the download queue if found + // Read the URL parameters for a magnet link and add it to the download textarea if found const urlParams = new URLSearchParams(window.location.search); const magnetURI = urlParams.get('magnet'); if (magnetURI) { document.getElementById('magnetURI').value = magnetURI; - try { - document.getElementById('submitDownload').click(); - history.replaceState({}, document.title, window.location.pathname); - } catch (error) { - console.error('Error adding download:', error); - } + history.replaceState({}, document.title, window.location.pathname); } });