hhnl.My.JDownloader.Api.DependencyInjection 1.0.0

dotnet add package hhnl.My.JDownloader.Api.DependencyInjection --version 1.0.0
                    
NuGet\Install-Package hhnl.My.JDownloader.Api.DependencyInjection -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="hhnl.My.JDownloader.Api.DependencyInjection" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="hhnl.My.JDownloader.Api.DependencyInjection" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="hhnl.My.JDownloader.Api.DependencyInjection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add hhnl.My.JDownloader.Api.DependencyInjection --version 1.0.0
                    
#r "nuget: hhnl.My.JDownloader.Api.DependencyInjection, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package hhnl.My.JDownloader.Api.DependencyInjection@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=hhnl.My.JDownloader.Api.DependencyInjection&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=hhnl.My.JDownloader.Api.DependencyInjection&version=1.0.0
                    
Install as a Cake Tool

hhnl.My.JDownloader.Api

A .NET client for the MyJDownloader API.

The library lets .NET applications connect to a JDownloader device registered with a MyJDownloader account and call device endpoints such as downloads, link grabber, accounts, system information, dialogs, plugins, and update checks.

Packages

  • hhnl.My.JDownloader.Api: core API client.
  • hhnl.My.JDownloader.Api.DependencyInjection: optional Microsoft dependency injection integration.

Installation

Install the core package:

dotnet add package hhnl.My.JDownloader.Api

For Microsoft dependency injection integration, install the DI package as well:

dotnet add package hhnl.My.JDownloader.Api.DependencyInjection

Requirements

  • A running JDownloader instance with MyJDownloader enabled.
  • A MyJDownloader account email and password.
  • The JDownloader device name as it appears in MyJDownloader.
  • .NET 10 or later.

Quick Start Without Dependency Injection

Use the static helper when you just want a device client without setting up a service container.

using hhnl.My.JDownloader.Api;

var device = await MyJDownloader.CreateDeviceClientAsync(
    email: "you@example.com",
    password: "my-jdownloader-password",
    deviceName: "My JDownloader");

var isOnline = await device.Device.PingAsync();
var packages = await device.DownloadsV2.QueryPackagesAsync(new()
{
    MaxResults = 50,
    ChildCount = true,
    Finished = true,
});

You can also configure client behavior:

var device = await MyJDownloader.CreateDeviceClientAsync(
    email: "you@example.com",
    password: "my-jdownloader-password",
    deviceName: "My JDownloader",
    configureOptions: options =>
    {
        options.DisableRemoteConnections = true;
        options.DisableDirectConnections = false;
    });

If you already know the direct connection endpoint, pass it explicitly:

var device = await MyJDownloader.CreateDeviceClientAsync(
    email: "you@example.com",
    password: "my-jdownloader-password",
    deviceName: "My JDownloader",
    customDirectConnectionEndpoint: "http://127.0.0.1:3129");

Dependency Injection

For applications that use IServiceCollection, install the dependency injection package and register the client:

using hhnl.My.JDownloader.Api;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

services
    .AddMyJDownloaderApi(options =>
    {
        options.DisableRemoteConnections = false;
    })
    .AddMyJDownloaderDevice(
        email: "you@example.com",
        password: "my-jdownloader-password",
        name: "My JDownloader");

var serviceProvider = services.BuildServiceProvider();
var serverClient = serviceProvider.GetRequiredService<MyJDownloaderServerClient>();
var device = await serverClient.CreateDeviceClientAsync();

Calling Endpoints

After creating a MyJDownloaderDevice, endpoints are exposed as properties:

var ping = await device.Device.PingAsync();
var speed = await device.DownloadController.GetSpeedInBpsAsync();
var linkGrabberCount = await device.LinkGrabberV2.GetPackageCountAsync();
var logs = await device.Log.GetAvailableLogsAsync();

Most endpoints mirror the MyJDownloader API naming and return generated model types from hhnl.My.JDownloader.Api.Models.

Add and Start Downloads

using hhnl.My.JDownloader.Api.Models;

var job = await device.LinkGrabberV2.AddLinksAsync(new MyJdAddLinksQueryV2
{
    Links = "https://example.com/file.zip",
    PackageName = "Example download",
    Autostart = false,
});

var links = await device.LinkGrabberV2.QueryLinksAsync(new MyJdCrawledLinkQueryV2
{
    JobUUIDs = [job.Id],
    MaxResults = 10,
    Url = true,
});

var linkIds = links.Select(x => x.UUID).ToArray();
var packageIds = links.Select(x => x.PackageUUID).Distinct().ToArray();

await device.LinkGrabberV2.MoveToDownloadListAsync(linkIds, packageIds);
await device.DownloadController.StartAsync();

Direct and Remote Connections

The client first logs in through https://api.jdownloader.org. When creating a device client, it can use direct connection information reported by JDownloader. If direct connection is unavailable and remote connections are allowed, it falls back to the MyJDownloader remote API.

Relevant options:

options.DisableDirectConnections = false;
options.DisableRemoteConnections = false;
options.HttpsCertificateMode = HttpsCertificateMode.Verify;

Use DisableRemoteConnections = true when you want failures instead of falling back to the remote API.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by the creators of JDownloader.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 139 6/16/2026
0.2.0 181 6/16/2026
0.1.0 125 6/16/2026