From e93e4f6f22e3e33407c19c48100984c1c679f821 Mon Sep 17 00:00:00 2001 From: omgbeez <251408589+omgbeez@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:15:57 -0500 Subject: [PATCH] Usenet support --- .../add-new-torrent.component.html | 105 +++- .../add-new-torrent.component.ts | 84 ++- client/src/app/models/torrent.model.ts | 6 + client/src/app/navbar/navbar.component.html | 6 +- client/src/app/torrent-status.pipe.ts | 2 +- client/src/app/torrent.service.ts | 14 + server/RdtClient.Data/Data/ITorrentData.cs | 1 + server/RdtClient.Data/Data/SettingData.cs | 2 +- server/RdtClient.Data/Data/TorrentData.cs | 16 + server/RdtClient.Data/Enums/DownloadType.cs | 7 + ...22148_AddDownloadTypeToTorrent.Designer.cs | 485 ++++++++++++++++++ ...20251224022148_AddDownloadTypeToTorrent.cs | 29 ++ .../Migrations/DataContextModelSnapshot.cs | 3 + server/RdtClient.Data/Models/Data/Torrent.cs | 7 +- .../DebridClientAvailableFile.cs} | 4 +- .../DebridClientFile.cs} | 4 +- .../DebridClientTorrent.cs} | 10 +- .../DebridClientUser.cs} | 4 +- .../Models/Internal/DbSettings.cs | 6 +- .../Models/Internal/TorrentDto.cs | 5 +- .../Models/Sabnzbd/SabnzbdCategory.cs | 24 + .../Models/Sabnzbd/SabnzbdConfig.cs | 15 + .../Models/Sabnzbd/SabnzbdHistory.cs | 15 + .../Models/Sabnzbd/SabnzbdHistorySlot.cs | 24 + .../Models/Sabnzbd/SabnzbdMisc.cs | 18 + .../Models/Sabnzbd/SabnzbdQueue.cs | 27 + .../Models/Sabnzbd/SabnzbdQueueSlot.cs | 36 ++ .../Models/Sabnzbd/SabnzbdResponse.cs | 30 ++ .../WatchFolderCheckerTests.cs | 213 ++++++++ .../Helpers/DownloadHelperTest.cs | 6 +- .../Helpers/FileHelperTest.cs | 101 ++++ .../RdtClient.Service.Test.csproj | 7 + .../Services/NzbTorrentsTest.cs | 135 +++++ .../Services/QBittorrentTest.cs | 57 ++ .../Services/SabnzbdTest.cs | 399 ++++++++++++++ ...ntTest.cs => AllDebridDebridClientTest.cs} | 60 +-- .../TorrentClients/TorBoxDebridClientTest.cs | 481 +++++++++++++++++ .../Services/TorrentsTest.cs | 92 ++++ .../BackgroundServices/WatchFolderChecker.cs | 23 +- server/RdtClient.Service/DiConfig.cs | 12 +- .../Helpers/CredentialRedactorEnricher.cs | 66 +++ .../RdtClient.Service/Helpers/FileHelper.cs | 10 +- .../Helpers/FileSizeHelper.cs | 24 + .../Middleware/SabnzbdHandler.cs | 58 +++ .../RdtClient.Service.csproj | 2 +- .../Services/Authentication.cs | 2 +- .../AllDebridDebridClient.cs} | 99 ++-- .../DebridLinkTorrentClient.cs | 182 +++---- .../IDebridClient.cs} | 26 +- .../PremiumizeDebridClient.cs} | 158 +++--- .../RealDebridDebridClient.cs} | 196 +++---- .../TorBoxDebridClient.cs} | 425 ++++++++++----- .../Services/DownloadClient.cs | 4 +- .../RdtClient.Service/Services/QBittorrent.cs | 21 +- .../Services/RemoteService.cs | 120 +++-- server/RdtClient.Service/Services/Sabnzbd.cs | 220 ++++++++ server/RdtClient.Service/Services/Torrents.cs | 298 ++++++++--- .../Services/UnpackClient.cs | 4 +- .../Controllers/SabnzbdControllerTest.cs | 255 +++++++++ .../Controllers/SabnzbdHandlerTest.cs | 118 +++++ .../Controllers/TorrentsControllerNzbTest.cs | 111 ++++ .../RdtClient.Web.Test.csproj | 32 ++ .../RdtClient.Web/.config/dotnet-tools.json | 5 +- .../Controllers/QBittorrentController.cs | 1 + .../Controllers/SabnzbdController.cs | 151 ++++++ .../Controllers/SabnzbdModeAttribute.cs | 23 + .../Controllers/TorrentsController.cs | 236 ++++++--- server/RdtClient.Web/Program.cs | 9 +- server/RdtClient.sln | 50 ++ 69 files changed, 4678 insertions(+), 803 deletions(-) create mode 100644 server/RdtClient.Data/Enums/DownloadType.cs create mode 100644 server/RdtClient.Data/Migrations/20251224022148_AddDownloadTypeToTorrent.Designer.cs create mode 100644 server/RdtClient.Data/Migrations/20251224022148_AddDownloadTypeToTorrent.cs rename server/RdtClient.Data/Models/{TorrentClient/TorrentClientAvailableFile.cs => DebridClient/DebridClientAvailableFile.cs} (52%) rename server/RdtClient.Data/Models/{TorrentClient/TorrentClientFile.cs => DebridClient/DebridClientFile.cs} (72%) rename server/RdtClient.Data/Models/{TorrentClient/TorrentClientTorrent.cs => DebridClient/DebridClientTorrent.cs} (76%) rename server/RdtClient.Data/Models/{TorrentClient/TorrentClientUser.cs => DebridClient/DebridClientUser.cs} (55%) create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdCategory.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdConfig.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdHistory.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdHistorySlot.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdMisc.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdQueue.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdQueueSlot.cs create mode 100644 server/RdtClient.Data/Models/Sabnzbd/SabnzbdResponse.cs create mode 100644 server/RdtClient.Service.Test/BackgroundServices/WatchFolderCheckerTests.cs create mode 100644 server/RdtClient.Service.Test/Helpers/FileHelperTest.cs create mode 100644 server/RdtClient.Service.Test/Services/NzbTorrentsTest.cs create mode 100644 server/RdtClient.Service.Test/Services/QBittorrentTest.cs create mode 100644 server/RdtClient.Service.Test/Services/SabnzbdTest.cs rename server/RdtClient.Service.Test/Services/TorrentClients/{AllDebridTorrentClientTest.cs => AllDebridDebridClientTest.cs} (82%) create mode 100644 server/RdtClient.Service.Test/Services/TorrentClients/TorBoxDebridClientTest.cs create mode 100644 server/RdtClient.Service/Helpers/CredentialRedactorEnricher.cs create mode 100644 server/RdtClient.Service/Helpers/FileSizeHelper.cs create mode 100644 server/RdtClient.Service/Middleware/SabnzbdHandler.cs rename server/RdtClient.Service/Services/{TorrentClients/AllDebridTorrentClient.cs => DebridClients/AllDebridDebridClient.cs} (86%) rename server/RdtClient.Service/Services/{TorrentClients => DebridClients}/DebridLinkTorrentClient.cs (86%) rename server/RdtClient.Service/Services/{TorrentClients/ITorrentClient.cs => DebridClients/IDebridClient.cs} (56%) rename server/RdtClient.Service/Services/{TorrentClients/PremiumizeTorrentClient.cs => DebridClients/PremiumizeDebridClient.cs} (87%) rename server/RdtClient.Service/Services/{TorrentClients/RealDebridTorrentClient.cs => DebridClients/RealDebridDebridClient.cs} (87%) rename server/RdtClient.Service/Services/{TorrentClients/TorBoxTorrentClient.cs => DebridClients/TorBoxDebridClient.cs} (54%) create mode 100644 server/RdtClient.Service/Services/Sabnzbd.cs create mode 100644 server/RdtClient.Web.Test/Controllers/SabnzbdControllerTest.cs create mode 100644 server/RdtClient.Web.Test/Controllers/SabnzbdHandlerTest.cs create mode 100644 server/RdtClient.Web.Test/Controllers/TorrentsControllerNzbTest.cs create mode 100644 server/RdtClient.Web.Test/RdtClient.Web.Test.csproj create mode 100644 server/RdtClient.Web/Controllers/SabnzbdController.cs create mode 100644 server/RdtClient.Web/Controllers/SabnzbdModeAttribute.cs diff --git a/client/src/app/add-new-torrent/add-new-torrent.component.html b/client/src/app/add-new-torrent/add-new-torrent.component.html index 0a3eee6..56b1c68 100644 --- a/client/src/app/add-new-torrent/add-new-torrent.component.html +++ b/client/src/app/add-new-torrent/add-new-torrent.component.html @@ -1,5 +1,24 @@
- Select which downloader is used to download this torrent from the debrid provider to your host. + Select which downloader is used to download this from the debrid provider to your host.
- When a torrent is finished downloading on the provider, perform this action. Use this setting if you only want + When a download is finished on the provider, perform this action. Use this setting if you only want to add files to your debrid provider but not download them to the host.
- When a torrent is finished downloading on the provider, perform this action. Use this setting if you only want + When a download is finished on the provider, perform this action. Use this setting if you only want to add files to your debrid provider but not download them to the host.
@@ -175,9 +232,14 @@- Set the priority for this torrent where 1 is the highest. When empty it will be assigned the lowest priority. + Set the priority where 1 is the highest. When empty it will be assigned the lowest priority.
+ + + +When a single download fails it will retry it this many times before marking it as failed.
- When a single download has failed multiple times (see setting above) or when the torrent itself received an - error it will retry the full torrent this many times before marking it failed. + When a single download has failed multiple times (see setting above) or when the download itself received an + error it will retry the full download this many times before marking it failed.
- The maximum lifetime of a torrent in minutes. When this time has passed, mark the torrent as error. If the - torrent is completed and has downloads, the lifetime setting will not apply. 0 to disable. + The maximum lifetime of a download in minutes. When this time has passed, mark it as error. If the + download is completed, the lifetime setting will not apply. 0 to disable.