Skip to content

Add Deluge download client support#740

Open
blackax1 wants to merge 1 commit into
Listenarrs:canaryfrom
blackax1:feature/deluge-refactor
Open

Add Deluge download client support#740
blackax1 wants to merge 1 commit into
Listenarrs:canaryfrom
blackax1:feature/deluge-refactor

Conversation

@blackax1

@blackax1 blackax1 commented Jul 6, 2026

Copy link
Copy Markdown

Summary

Refactors and completes the Deluge download client implementation to align with the new download-client architecture boundaries introduced in PR #599, addressing PR #697.

Changes

Added

  • DelugeRpcClient.cs to centralize HTTP JSON-RPC communications, session authentication, and daemon connectivity.
  • DelugeConnectionTester.cs to encapsulate connection testing logic.
  • DelugeAddWorkflow.cs to manage torrent submissions (magnets, files, URLs) and category labels.
  • DelugeRemovalWorkflow.cs to handle torrent deletions.
  • DelugeQueueFetchWorkflow.cs to manage queue monitoring and targeted polling with correct exception handling (DownloadClientAdapterPollingException).
  • DelugeItemFetchWorkflow.cs to retrieve active download items.
  • DelugeImportItemResolver.cs to resolve files and remote output paths before import.
  • DelugeApiMock.cs to mock JSON-RPC responses.

Changed

  • DownloadClientTypes.cs to define the "deluge" constant.
  • DownloadClientRegistrationExtensions.cs to register the new Deluge workflows and adapter facade in dependency injection.
  • DelugeAdapter.cs refactored as a thin adapter facade delegating to client-specific workflows.
  • MockUtils.cs and ServiceCollectionBuilder.cs updated to register and configure DelugeApiMock for tests.
  • DownloadClientWorkflowRegistrationTests.cs to verify Deluge workflows and adapter resolve correctly from DI.
  • DelugeAdapterTests.cs rewritten to utilize the mock API registration pattern.

Testing

  • Automated Tests: Verified that all backend unit and integration tests compile and pass successfully (dotnet test run within a .NET SDK 10.0 container, 1202/1202 passing).
  • Manual Verification: Built the project locally as a container using the monorepo Dockerfile (podman build) and verified connectivity, queue updates, and configuration settings with a live Deluge instance.

@blackax1
blackax1 requested a review from a team July 6, 2026 20:11
@Algorant

Algorant commented Jul 9, 2026

Copy link
Copy Markdown

Oh cool thank you for doing this! Let me test it when I have some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants