From e60059a5bd38a3e0c6409906a7a473b2ad988dc3 Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Sat, 31 Aug 2024 10:17:27 +1000 Subject: [PATCH] Fix deleting torrents from provider --- server/RdtClient.Service/RdtClient.Service.csproj | 2 +- .../Services/TorrentClients/TorBoxTorrentClient.cs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/RdtClient.Service/RdtClient.Service.csproj b/server/RdtClient.Service/RdtClient.Service.csproj index 71d18a9..16c826c 100644 --- a/server/RdtClient.Service/RdtClient.Service.csproj +++ b/server/RdtClient.Service/RdtClient.Service.csproj @@ -22,7 +22,7 @@ - + diff --git a/server/RdtClient.Service/Services/TorrentClients/TorBoxTorrentClient.cs b/server/RdtClient.Service/Services/TorrentClients/TorBoxTorrentClient.cs index 6cf14d8..9d8a57b 100644 --- a/server/RdtClient.Service/Services/TorrentClients/TorBoxTorrentClient.cs +++ b/server/RdtClient.Service/Services/TorrentClients/TorBoxTorrentClient.cs @@ -168,15 +168,13 @@ public class TorBoxTorrentClient(ILogger logger, IHttpClien public async Task Delete(String torrentId) { - await GetClient().Torrents.ControlAsync(Convert.ToInt32(torrentId), "delete"); + await GetClient().Torrents.ControlAsync(torrentId, "delete"); } public async Task Unrestrict(String link) { var torrentFile = new List(link.Split('/')); - var torrentID = torrentFile[4]; - var fileID = torrentFile[5]; - var result = await GetClient().Unrestrict.LinkAsync(torrentID, fileID); + var result = await GetClient().Unrestrict.LinkAsync(torrentID: torrentFile[4], fileID: torrentFile[5]); if (result.Error != null) {