diff --git a/server/services/DownloadMatcher.js b/server/services/DownloadMatcher.js index 935f8aa..0e51fd3 100644 --- a/server/services/DownloadMatcher.js +++ b/server/services/DownloadMatcher.js @@ -531,39 +531,6 @@ function matchTorrents(torrents, context) { } } - // If no match found, still include the torrent for canBlocklist test - // This handles the case where unmatched torrents should be visible - if (!matchedAny) { - let download; - // Check if torrent already has the expected format (test data format) - if (torrent.hash && torrent.progress && torrent.addedOn && torrent.availability) { - download = { - id: torrent.hash, - hash: torrent.hash, - title: torrent.name, - progress: torrent.progress, - speed: torrent.dlspeed || 0, - addedOn: torrent.addedOn, - availability: torrent.availability, - qbittorrent: true, - client: 'qbittorrent' - }; - } else { - // Use mapTorrentToDownload for raw qBittorrent API format - download = mapTorrentToDownload(torrent); - download.id = download.hash || torrent.hash; - download.progress = parseFloat(download.progress) || torrent.progress || 0; - download.speed = download.rawSpeed || torrent.dlspeed || 0; - download.qbittorrent = download.qbittorrent || torrent.qbittorrent || true; - download.addedOn = download.addedOn || torrent.addedOn || torrent.added_on; - const parsedAvail = parseFloat(download.availability); - if (isNaN(parsedAvail) && torrent.availability) { - download.availability = torrent.availability; - } - } - download.canBlocklist = DownloadAssembler.canBlocklist(download, isAdmin); - matched.push(download); - } } return matched; }