### Install .NET SDK on Ubuntu Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Installs the .NET SDK version 10.0 on Ubuntu 20.04. Ensure you have wget installed. ```bash wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb ``` ```bash sudo dpkg -i packages-microsoft-prod.deb ``` ```bash rm packages-microsoft-prod.deb ``` ```bash sudo apt-get update && sudo apt-get install -y dotnet-sdk-10.0 ``` -------------------------------- ### Enable and Start RDT Client Service on Linux Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Reloads the systemd daemon, enables the RDT Client service to start on boot, and starts the service. ```bash sudo systemctl daemon-reload ``` ```bash sudo systemctl enable rdtc ``` ```bash sudo systemctl start rdtc ``` -------------------------------- ### Example IOException in Logs Source: https://github.com/rogerfar/rdt-client/blob/main/README.md This is an example of the 'Permission denied' IOException that may appear in the RDT client log file when CIFS connections are not properly configured. ```csharp System.IO.IOException: Permission denied ``` -------------------------------- ### RDT Client Configuration - Windows Paths Example Source: https://context7.com/rogerfar/rdt-client/llms.txt Illustrates how to configure Windows-style paths in the appsettings.json file, requiring backslash escaping. ```json # Windows paths example (escape backslashes): { "Logging": { "File": { "Path": "D:\\RdtClient\\logs\\rdtclient.log" } }, "Database": { "Path": "D:\\RdtClient\\db\\rdtclient.db" } } ``` -------------------------------- ### RDT Client Configuration File (appsettings.json) Source: https://context7.com/rogerfar/rdt-client/llms.txt Example JSON structure for the appsettings.json file, controlling logging, database paths, and network port. ```json { "Logging": { "File": { "Path": "/data/db/rdtclient.log", "FileSizeLimitBytes": 5242880, "MaxRollingFiles": 5 } }, "Database": { "Path": "/data/db/rdtclient.db" }, "Port": "6500", "BasePath": null } ``` -------------------------------- ### Windows Path Escaping Example Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Demonstrates how to escape backslashes when specifying Windows paths in the `appsettings.json` file. ```json "D:\\RdtClient\\db\\rdtclient.db" ``` -------------------------------- ### Create Initial User Credentials with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt This endpoint is for first-time setup only. It creates the initial administrative credentials for the RDT Client. Ensure you use a strong, secure password. ```bash # Create initial user (first-time setup only) curl -X POST "http://localhost:6500/Api/Authentication/Create" -H "Content-Type: application/json" -d '{ "userName": "admin", "password": "your-secure-password" }' ``` -------------------------------- ### Setup Debrid Provider with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Configure your debrid service provider after logging in. This is a one-time setup per provider. Supported providers are RealDebrid, AllDebrid, Premiumize, TorBox, and DebridLink. ```bash # Setup debrid provider (after login, first-time only) # Provider values: 0=RealDebrid, 1=AllDebrid, 2=Premiumize, 3=TorBox, 4=DebridLink curl -X POST "http://localhost:6500/Api/Authentication/SetupProvider" -H "Content-Type: application/json" -H "Cookie: .AspNetCore.Identity.Application=" -d '{ "provider": 0, "token": "your-real-debrid-api-key" }' ``` -------------------------------- ### Get SABnzbd Configuration Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves the current configuration settings. Requires an API key. ```bash curl -X GET "http://localhost:6500/api?mode=get_config&apikey=YOUR_API_KEY" ``` -------------------------------- ### Sonarr/Radarr Integration Source: https://context7.com/rogerfar/rdt-client/llms.txt Configuration guide for integrating RDT Client with Sonarr or Radarr. ```APIDOC ## Sonarr/Radarr Integration ### Description Configure Sonarr or Radarr to use RDT Client as a qBittorrent download client. ### Download Client Configuration 1. **Add Download Client**: Navigate to `Settings -> Download Clients -> Add` in Sonarr/Radarr and select `qBittorrent`. 2. **Connection Settings**: * **Host**: `192.168.1.100` (or the hostname of your RDT Client) * **Port**: `6500` * **Username**: `admin` (RDT Client username) * **Password**: `password` (RDT Client password) * **Category**: `sonarr` (or `radarr` for Radarr) 3. **Optional Settings**: * Use SSL: `No` * URL Base: (leave empty) * Sequential Order: `No` * First and Last First: `No` ### Remote Path Mapping If your download directory on RDT Client differs from the path Sonarr/Radarr expects, configure Remote Path Mappings: * **Remote Path**: `/data/downloads/sonarr` (or equivalent for Radarr) * **Local Path**: `/mnt/media/downloads/sonarr` (or equivalent on your Sonarr/Radarr server) ### Testing Connection Use the following commands to test the connection and API access: ```bash # Test authentication curl -X POST "http://rdtclient:6500/api/v2/auth/login" \ -d "username=admin&password=password" # Verify torrents endpoint works (replace with the actual SID) curl -X GET "http://rdtclient:6500/api/v2/torrents/info" \ -H "Cookie: SID=" ``` ### Available Categories Categories can be configured in RDT Client under `Settings -> General -> Categories`. Common categories include: `sonarr,radarr,lidarr,movies,tv`. ``` -------------------------------- ### Get SABnzbd Categories Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves the list of configured categories. Requires an API key. ```bash curl -X GET "http://localhost:6500/api?mode=get_cats&apikey=YOUR_API_KEY" ``` -------------------------------- ### Get SABnzbd Version Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves the SABnzbd emulation version. Requires an API key. ```bash curl -X GET "http://localhost:6500/api?mode=version&apikey=YOUR_API_KEY" ``` -------------------------------- ### Update All Containers with Docker Compose Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Recreates and starts all services defined in docker-compose.yml, applying any updated images. ```bash docker-compose up -d ``` -------------------------------- ### Get Specific Torrent by ID with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Fetch detailed information for a single torrent using its unique identifier. This endpoint requires the torrent's GUID and an active session cookie. ```bash # Get specific torrent by ID curl -X GET "http://localhost:6500/Api/Torrents/Get/12345678-1234-1234-1234-123456789abc" -H "Cookie: .AspNetCore.Identity.Application=" ``` -------------------------------- ### Get SABnzbd Download History Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves the download history. Requires an API key. ```bash curl -X GET "http://localhost:6500/api?mode=history&apikey=YOUR_API_KEY" ``` -------------------------------- ### Get SABnzbd Full Status Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves the complete status of the download service. Requires an API key. ```bash curl -X GET "http://localhost:6500/api?mode=fullstatus&apikey=YOUR_API_KEY" ``` -------------------------------- ### RDT Client Configuration - Reverse Proxy Base Path Source: https://context7.com/rogerfar/rdt-client/llms.txt Example configuration for setting a BasePath in appsettings.json when running RDT Client behind a reverse proxy. ```json # Running behind reverse proxy with base path: { "BasePath": "/rdtclient" } ``` -------------------------------- ### Get Transfer Info Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves current upload and download speeds. Requires authentication. ```bash curl -X GET "http://localhost:6500/api/v2/transfer/info" \ -H "Cookie: SID=" ``` -------------------------------- ### Update a Single Container with Docker Compose Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Recreates and starts a specific service, 'rdtclient', applying any updated image. ```bash docker-compose up -d rdtclient ``` -------------------------------- ### Authentication API Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints for managing user sessions, initial setup, and debrid provider configuration. ```APIDOC ## GET /Api/Authentication/IsLoggedIn ### Description Checks the current authentication status of the user. ### Method GET ### Endpoint /Api/Authentication/IsLoggedIn ### Response #### Success Response (200) - **Status** (string) - Logged in ## POST /Api/Authentication/Create ### Description Creates the initial user account for first-time setup. ### Method POST ### Endpoint /Api/Authentication/Create ### Request Body - **userName** (string) - Required - Username for the admin account - **password** (string) - Required - Password for the admin account ## POST /Api/Authentication/SetupProvider ### Description Configures the debrid provider for the application. ### Method POST ### Endpoint /Api/Authentication/SetupProvider ### Request Body - **provider** (integer) - Required - 0=RealDebrid, 1=AllDebrid, 2=Premiumize, 3=TorBox, 4=DebridLink - **token** (string) - Required - API key for the selected provider ``` -------------------------------- ### Get Sync Main Data Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves main data used by clients for efficient updates. Requires authentication. ```bash curl -X GET "http://localhost:6500/api/v2/sync/maindata" \ -H "Cookie: SID=" ``` -------------------------------- ### CIFS Mount Options for RDT Client Source: https://github.com/rogerfar/rdt-client/blob/main/README.md When using rootless Podman on a Linux host with CIFS connections, the 'nobrl' option must be specified in the mount options to avoid 'Permission denied' errors. This example shows typical options. ```bash Options=_netdev,credentials=/etc/samba/credentials/600file,rw,uid=SUBUID,gid=SBUGID,nobrl,file_mode=0770,dir_mode=0770,noperm ``` -------------------------------- ### Get SABnzbd Download Queue Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves the current download queue status. Requires an API key. ```bash curl -X GET "http://localhost:6500/api?mode=queue&apikey=YOUR_API_KEY" ``` -------------------------------- ### Check Login Status with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Use this endpoint to verify the current authentication status. It returns different status codes based on whether a user is logged in, requires setup, or is not authenticated. ```bash # Check login status curl -X GET "http://localhost:6500/Api/Authentication/IsLoggedIn" -H "Content-Type: application/json" ``` -------------------------------- ### Get Torrent Tags Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieves torrent tags. Note: This endpoint may not be fully implemented and might return an empty list. ```bash curl -X GET "http://localhost:6500/api/v2/torrents/tags" \ -H "Cookie: SID=" ``` -------------------------------- ### Display Torrent Unpacking Status Source: https://github.com/rogerfar/rdt-client/blob/main/client/src/app/torrent/torrent.component.html Conditionally displays the start and end times of torrent unpacking if available, otherwise indicates that unpacking has not yet begun. ```HTML @if (download.unpackingStarted) { {{ download.unpackingStarted | date: "fullDate" }} {{ download.unpackingStarted | date: "mediumTime" }} } @else { (not started unpacking yet) } ``` ```HTML @if (download.unpackingFinished) { {{ download.unpackingFinished | date: "fullDate" }} {{ download.unpackingFinished | date: "mediumTime" }} } @else { (not finished unpacking yet) } ``` -------------------------------- ### Get Disk Space Status with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Check the available disk space on the server where RDT Client is running. This is useful for monitoring download capacity. Requires an active session cookie. ```bash # Get disk space status curl -X GET "http://localhost:6500/Api/Torrents/DiskSpaceStatus" -H "Cookie: .AspNetCore.Identity.Application=" ``` -------------------------------- ### Access RDT Client Container Shell Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Use this command to get shell access to a running RDT Client container for debugging or inspection. ```bash docker exec -it rtdclient /bin/bash ``` -------------------------------- ### Get All Torrents with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieve a list of all torrents currently managed by RDT Client, including their download status, progress, and associated download client details. Requires an active session cookie. ```bash # Get all torrents with download status curl -X GET "http://localhost:6500/Api/Torrents" -H "Cookie: .AspNetCore.Identity.Application=" ``` -------------------------------- ### qBittorrent API Emulation - General Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints that emulate the qBittorrent WebUI API for general application information. ```APIDOC ## POST /api/v2/auth/login ### Description Authenticates the user and establishes a session. ### Method POST ### Endpoint /api/v2/auth/login ### Parameters #### Request Body - **username** (string) - Required - The username for authentication. - **password** (string) - Required - The password for authentication. ### Response #### Success Response (200) - **message** (string) - "Ok." on success, "Fails." on failure. ## GET /api/v2/app/version ### Description Retrieves the application version. ### Method GET ### Endpoint /api/v2/app/version ### Response #### Success Response (200) - **version** (string) - The application version (e.g., "v4.3.2"). ## GET /api/v2/app/webapiVersion ### Description Retrieves the WebAPI version. ### Method GET ### Endpoint /api/v2/app/webapiVersion ### Response #### Success Response (200) - **version** (string) - The WebAPI version (e.g., "2.7"). ## GET /api/v2/app/preferences ### Description Retrieves the application preferences. ### Method GET ### Endpoint /api/v2/app/preferences ## GET /api/v2/torrents/info ### Description Retrieves information about all torrents, with optional filtering by category, state, or hash. ### Method GET ### Endpoint /api/v2/torrents/info #### Query Parameters - **category** (string) - Optional - Filters torrents by category. - **filter** (string) - Optional - Filters torrents by state (e.g., "downloading", "completed"). - **hashes** (string) - Optional - Filters torrents by a pipe-separated list of hashes. ## GET /api/v2/torrents/count ### Description Retrieves the total count of torrents. ### Method GET ### Endpoint /api/v2/torrents/count ## GET /api/v2/torrents/properties ### Description Retrieves detailed properties for a specific torrent. ### Method GET ### Endpoint /api/v2/torrents/properties #### Query Parameters - **hash** (string) - Required - The hash of the torrent. ## GET /api/v2/torrents/files ### Description Retrieves the list of files for a specific torrent. ### Method GET ### Endpoint /api/v2/torrents/files #### Query Parameters - **hash** (string) - Required - The hash of the torrent. ## GET /api/v2/torrents/trackers ### Description Retrieves the list of trackers for a specific torrent. ### Method GET ### Endpoint /api/v2/torrents/trackers #### Query Parameters - **hash** (string) - Required - The hash of the torrent. ## GET /api/v2/torrents/categories ### Description Retrieves all defined categories. ### Method GET ### Endpoint /api/v2/torrents/categories ### Response #### Success Response (200) - **categories** (object) - An object where keys are category names and values contain category details (e.g., name, savePath). ``` -------------------------------- ### Test System Settings Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints for verifying path permissions, download speeds, and Aria2c connectivity. ```bash curl -X POST "http://localhost:6500/Api/Settings/TestPath" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{"path": "/data/downloads"}' ``` ```bash curl -X GET "http://localhost:6500/Api/Settings/TestDownloadSpeed" \ -H "Cookie: .AspNetCore.Identity.Application=" ``` ```bash curl -X POST "http://localhost:6500/Api/Settings/TestAria2cConnection" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "url": "http://127.0.0.1:6800/jsonrpc", "secret": "mysecret123" }' ``` -------------------------------- ### Configuration File Source: https://context7.com/rogerfar/rdt-client/llms.txt Details about the `appsettings.json` configuration file. ```APIDOC ## Configuration File (`appsettings.json`) ### Description The `appsettings.json` file controls core application settings, including database location, logging, and network configuration. ### Default Structure ```json { "Logging": { "File": { "Path": "/data/db/rdtclient.log", "FileSizeLimitBytes": 5242880, "MaxRollingFiles": 5 } }, "Database": { "Path": "/data/db/rdtclient.db" }, "Port": "6500", "BasePath": null } ``` ### Examples #### Windows Paths Ensure backslashes are properly escaped. ```json { "Logging": { "File": { "Path": "D:\\RdtClient\\logs\\rdtclient.log" } }, "Database": { "Path": "D:\\RdtClient\\db\\rdtclient.db" } } ``` #### Reverse Proxy with Base Path If running behind a reverse proxy, specify the base path. ```json { "BasePath": "/rdtclient" } ``` ``` -------------------------------- ### Docker Deployment Source: https://context7.com/rogerfar/rdt-client/llms.txt Instructions for deploying RDT Client using Docker. ```APIDOC ## Docker Deployment ### Description Deploy RDT Client using Docker for persistent data and downloads. ### Docker Compose ```yaml version: '3.3' services: rdtclient: image: rogerfar/rdtclient container_name: rdtclient environment: - PUID=1000 - PGID=1000 - TZ=America/New_York volumes: # Database and logs - /opt/rdtclient/data:/data/db # Download destination (must match settings) - /mnt/media/downloads:/data/downloads ports: - 6500:6500 restart: unless-stopped logging: driver: json-file options: max-size: 10m ``` ### Docker CLI Deployment ```bash docker run -d \ --name=rdtclient \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=America/New_York \ -p 6500:6500 \ -v /opt/rdtclient/data:/data/db \ -v /mnt/media/downloads:/data/downloads \ --restart unless-stopped \ rogerfar/rdtclient ``` ### Management Commands - **View logs**: `docker logs -f rdtclient` - **Shell access**: `docker exec -it rdtclient /bin/bash` - **Update container**: `docker-compose pull rdtclient && docker-compose up -d rdtclient` ``` -------------------------------- ### Deploy rdt-client with Docker CLI Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Alternative method for running the container directly via the command line interface. ```bash docker run -d \ --name=rdtclient \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ -p 6500:6500 \ -v :/data/db \ -v :/data/downloads \ --restart unless-stopped \ rogerfar/rdtclient ``` -------------------------------- ### Create systemd Service File for RDT Client Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Creates a systemd service file for RDT Client. Ensure `WorkingDirectory` and `User` are correctly set for your environment. ```bash sudo nano /etc/systemd/system/rdtc.service ``` ```systemd [Unit] Description=RdtClient Service [Service] WorkingDirectory=/home//rdtc ExecStart=/usr/bin/dotnet RdtClient.Web.dll SyslogIdentifier=RdtClient User= [Install] WantedBy=multi-user.target ``` -------------------------------- ### qBittorrent API Authentication and Info Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints for authenticating and retrieving application or torrent information via the emulated qBittorrent API. ```bash curl -X POST "http://localhost:6500/api/v2/auth/login" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=admin&password=your-password" ``` ```bash curl -X GET "http://localhost:6500/api/v2/app/version" ``` ```bash curl -X GET "http://localhost:6500/api/v2/app/webapiVersion" ``` ```bash curl -X GET "http://localhost:6500/api/v2/app/preferences" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/info" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/info?category=sonarr" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/info?filter=downloading" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/info?hashes=HASH1|HASH2" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/count" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/properties?hash=TORRENT_HASH" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/files?hash=TORRENT_HASH" \ -H "Cookie: SID=" ``` ```bash curl -X GET "http://localhost:6500/api/v2/torrents/trackers?hash=TORRENT_HASH" \ -H "Cookie: SID=" ``` -------------------------------- ### Build RDT Client Docker Image Locally Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Builds the 'rogerfar/rtd-client:latest' Docker image from the cloned repository, disabling cache and ensuring the latest base image is pulled. ```bash docker build \ --no-cache \ --pull \ -t rogerfar/rtd-client:latest . ``` -------------------------------- ### Build RDT Client Docker Container Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Use these commands to build and manage the RDT client Docker container. Ensure you are in the root of the project directory. ```bash docker build --tag rdtclient . ``` ```bash docker run --publish 6500:6500 --detach --name rdtclientdev rdtclient:latest ``` ```bash docker stop rdtclient ``` ```bash docker rm rdtclient ``` ```bash docker-build.bat ``` -------------------------------- ### Manage Application Settings Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints for retrieving and updating application configuration and provider profiles. ```bash curl -X GET "http://localhost:6500/Api/Settings" \ -H "Cookie: .AspNetCore.Identity.Application=" ``` ```bash curl -X PUT "http://localhost:6500/Api/Settings" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '[ {"key": "DownloadClient:Client", "value": "0"}, {"key": "DownloadClient:DownloadPath", "value": "/data/downloads"}, {"key": "DownloadClient:MappedPath", "value": "/mnt/media/downloads"}, {"key": "DownloadClient:MaxSpeed", "value": "0"}, {"key": "DownloadClient:ParallelCount", "value": "8"}, {"key": "General:DownloadLimit", "value": "2"}, {"key": "General:UnpackLimit", "value": "1"}, {"key": "General:Categories", "value": "sonarr,radarr,movies,tv"}, {"key": "Provider:CheckInterval", "value": "10"} ]' ``` ```bash curl -X GET "http://localhost:6500/Api/Settings/Profile" \ -H "Cookie: .AspNetCore.Identity.Application=" ``` ```bash curl -X GET "http://localhost:6500/Api/Settings/Version" \ -H "Cookie: .AspNetCore.Identity.Application=" ``` -------------------------------- ### Download and Extract Client Archive on Linux Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Downloads the latest release archive and extracts it to a specified directory. Replace `` with the actual download link. ```bash wget ``` ```bash unzip RealDebridClient.zip -d ~/rdtc && cd ~/rdtc ``` -------------------------------- ### Deploy rdt-client with Docker Compose Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Recommended method for deploying the container using a YAML configuration file compatible with Docker Compose v2 schemas. ```yaml --- version: '3.3' services: rdtclient: image: rogerfar/rdtclient container_name: rdtclient environment: - PUID=1000 - PGID=1000 - TZ=Europe/London volumes: - :/data/db - :/data/downloads logging: driver: json-file options: max-size: 10m ports: - 6500:6500 restart: unless-stopped ``` -------------------------------- ### Register QEMU User Static for Multi-Arch Builds Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Registers QEMU user static binaries, enabling the execution of different CPU architectures on your current hardware. This is a prerequisite for building ARM variants on x86_64. ```bash docker run --rm --privileged multiarch/qemu-user-static:register --reset ``` -------------------------------- ### Manage Torrents via qBittorrent API Source: https://context7.com/rogerfar/rdt-client/llms.txt Methods for adding, deleting, and modifying torrent states using the qBittorrent-compatible API. ```bash curl -X POST "http://localhost:6500/api/v2/torrents/add" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "urls=magnet:?xt=urn:btih:HASH&category=sonarr" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/add" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "urls=https://example.com/torrent.torrent&category=radarr" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/add" \ -H "Cookie: SID=" \ -F "torrents=@/path/to/file.torrent" \ -F "category=movies" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/delete" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "hashes=HASH1|HASH2&deleteFiles=true" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/pause" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "hashes=HASH1|HASH2" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/resume" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "hashes=HASH1|HASH2" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/setCategory" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "hashes=HASH1&category=movies" ``` ```bash curl -X POST "http://localhost:6500/api/v2/torrents/topPrio" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "hashes=HASH1" ``` -------------------------------- ### Manage Categories Source: https://context7.com/rogerfar/rdt-client/llms.txt Retrieve defined download categories. ```bash curl -X GET "http://localhost:6500/api/v2/torrents/categories" \ -H "Cookie: SID=" ``` -------------------------------- ### Test RDT Client on Linux Source: https://github.com/rogerfar/rdt-client/blob/main/README.md Tests if the RDT client runs correctly by executing the DLL. Access it via http://:6500. ```bash dotnet RdtClient.Web.dll ``` -------------------------------- ### Add NZB via URL (SABnzbd Emulation) Source: https://context7.com/rogerfar/rdt-client/llms.txt Adds an NZB file to the download queue using its URL. Requires an API key and specifies category and priority. ```bash curl -X GET "http://localhost:6500/api?mode=addurl&name=https://example.com/file.nzb&cat=usenet&priority=0&apikey=YOUR_API_KEY" ``` -------------------------------- ### Get Rate Limit Status with cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Query the current rate limit status for your configured debrid provider API. This helps in understanding potential API usage restrictions. Requires an active session cookie. ```bash # Get rate limit status (for debrid provider API limits) curl -X GET "http://localhost:6500/Api/Torrents/RateLimitStatus" -H "Cookie: .AspNetCore.Identity.Application=" ``` -------------------------------- ### qBittorrent API - Torrent Management Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints for managing torrents, including adding, deleting, pausing, and resuming. ```APIDOC ## POST /api/v2/torrents/add ### Description Adds a new torrent to the client, either via magnet link, URL, or file upload. ### Method POST ### Endpoint /api/v2/torrents/add ### Parameters #### Request Body - **urls** (string) - Optional - Magnet link or URL of the torrent file. - **category** (string) - Optional - The category to assign to the torrent. - **torrents** (file) - Optional - A torrent file to upload. ### Request Example (Magnet Link) ``` urls=magnet:?xt=urn:btih:HASH&category=sonarr ``` ### Request Example (URL) ``` urls=https://example.com/torrent.torrent&category=radarr ``` ### Request Example (File Upload) ``` Content-Disposition: form-data; name="torrents"; filename="file.torrent" Content-Type: application/x-torrent [torrent file content] ``` ## POST /api/v2/torrents/delete ### Description Deletes one or more torrents. ### Method POST ### Endpoint /api/v2/torrents/delete ### Parameters #### Request Body - **hashes** (string) - Required - A pipe-separated string of torrent hashes to delete. - **deleteFiles** (boolean) - Optional - Whether to also delete the torrent's files from disk. ## POST /api/v2/torrents/pause ### Description Pauses the download or seeding of specified torrents. ### Method POST ### Endpoint /api/v2/torrents/pause ### Parameters #### Request Body - **hashes** (string) - Required - A pipe-separated string of torrent hashes to pause. ## POST /api/v2/torrents/resume ### Description Resumes the download or seeding of specified torrents. ### Method POST ### Endpoint /api/v2/torrents/resume ### Parameters #### Request Body - **hashes** (string) - Required - A pipe-separated string of torrent hashes to resume. ## POST /api/v2/torrents/setCategory ### Description Assigns a category to one or more torrents. ### Method POST ### Endpoint /api/v2/torrents/setCategory ### Parameters #### Request Body - **hashes** (string) - Required - A pipe-separated string of torrent hashes. - **category** (string) - Required - The category to assign. ## POST /api/v2/torrents/topPrio ### Description Sets the priority of specified torrents to the highest level. ### Method POST ### Endpoint /api/v2/torrents/topPrio ### Parameters #### Request Body - **hashes** (string) - Required - A pipe-separated string of torrent hashes. ``` -------------------------------- ### Pull RDT Client Docker Image Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Downloads the latest version of the 'rogerfar/rdtclient' Docker image from the registry. ```bash docker pull rogerfar/rdtclient ``` -------------------------------- ### Add NZB File Upload (SABnzbd Emulation) Source: https://context7.com/rogerfar/rdt-client/llms.txt Adds an NZB file to the download queue via file upload. Requires an API key and specifies category. ```bash curl -X POST "http://localhost:6500/api?mode=addfile&apikey=YOUR_API_KEY" \ -F "nzbfile=@/path/to/file.nzb" \ -F "cat=usenet" ``` -------------------------------- ### Sonarr/Radarr Download Client Configuration Source: https://context7.com/rogerfar/rdt-client/llms.txt Configuration settings for integrating RDT Client as a download client within Sonarr or Radarr, including connection details and remote path mappings. ```yaml # Sonarr/Radarr Download Client Configuration: # Settings -> Download Clients -> Add -> qBittorrent # Connection Settings: Host: 192.168.1.100 # or hostname of RDT Client Port: 6500 Username: admin # RDT Client username Password: password # RDT Client password Category: sonarr # or 'radarr' for Radarr # Optional Settings: Use SSL: No URL Base: (leave empty) Sequential Order: No First and Last First: No # Remote Path Mapping (if needed): # Settings -> Download Clients -> Remote Path Mappings # Remote Path: /data/downloads/sonarr # Local Path: /mnt/media/downloads/sonarr ``` -------------------------------- ### Configure Docker Secrets Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Use the FILE__ prefix to set environment variables from the contents of a file, such as Docker secrets. ```bash -e FILE__PASSWORD=/run/secrets/mysecretpassword ``` -------------------------------- ### Inspect RDT Client Container Version Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Retrieves the build version label from the RDT Client container. ```bash docker inspect -f '{{ index .Config.Labels "build_version" }}' rdtclient ``` -------------------------------- ### Inspect RDT Client Image Version Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Retrieves the build version label from the RDT Client Docker image. ```bash docker inspect -f '{{ index .Config.Labels "build_version" }}' rogerfar/rdtclient ``` -------------------------------- ### Create New Torrent Category Source: https://context7.com/rogerfar/rdt-client/llms.txt Use this endpoint to create a new category for organizing torrents. Requires authentication. ```bash curl -X POST "http://localhost:6500/api/v2/torrents/createCategory" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Cookie: SID=" \ -d "category=movies" ``` -------------------------------- ### PUT /Api/Settings Source: https://context7.com/rogerfar/rdt-client/llms.txt Updates application settings in a batch operation. ```APIDOC ## PUT /Api/Settings ### Description Updates application configuration settings using a list of key-value pairs. ### Method PUT ### Endpoint http://localhost:6500/Api/Settings ### Request Body - **Array of objects** (list) - Required - List of settings containing 'key' and 'value' fields. ``` -------------------------------- ### Configure Base Path via Docker Environment Variable Source: https://context7.com/rogerfar/rdt-client/llms.txt Use the BASE_PATH environment variable to override the default URL path when deploying via Docker. ```bash docker run -e BASE_PATH=/rdtclient ... ``` -------------------------------- ### Upload Torrent or NZB Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints for adding torrents via magnet links or files, and NZBs via files or URLs. ```bash curl -X POST "http://localhost:6500/Api/Torrents/UploadMagnet" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "magnetLink": "magnet:?xt=urn:btih:HASH&dn=Torrent+Name", "torrent": { "category": "radarr", "downloadAction": 0, "finishedAction": 0, "hostDownloadAction": 0, "downloadMinSize": 5, "includeRegex": null, "excludeRegex": "\\.(txt|nfo|jpg|png)$", "downloadRetryAttempts": 3, "torrentRetryAttempts": 1, "deleteOnError": 60, "lifetime": 0, "priority": 1 } }' ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/UploadFile" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -F "file=@/path/to/torrent.torrent" \ -F 'formData={"torrent":{"category":"sonarr","downloadMinSize":5,"finishedAction":0}}' ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/UploadNzbFile" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -F "file=@/path/to/download.nzb" \ -F 'formData={"torrent":{"category":"usenet","downloadMinSize":0}}' ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/UploadNzbLink" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "nzbLink": "https://example.com/download.nzb", "torrent": { "rdName": "Download Name", "category": "usenet" } }' ``` -------------------------------- ### Manage Torrent Lifecycle Source: https://context7.com/rogerfar/rdt-client/llms.txt Operations for checking, deleting, retrying, updating, and verifying torrents. ```bash curl -X POST "http://localhost:6500/Api/Torrents/CheckFilesMagnet" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "magnetLink": "magnet:?xt=urn:btih:HASH" }' ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/Delete/12345678-1234-1234-1234-123456789abc" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "deleteData": true, "deleteRdTorrent": true, "deleteLocalFiles": false }' ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/Retry/12345678-1234-1234-1234-123456789abc" \ -H "Cookie: .AspNetCore.Identity.Application=" ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/RetryDownload/87654321-4321-4321-4321-cba987654321" \ -H "Cookie: .AspNetCore.Identity.Application=" ``` ```bash curl -X PUT "http://localhost:6500/Api/Torrents/Update" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "torrentId": "12345678-1234-1234-1234-123456789abc", "category": "movies", "priority": 1, "downloadRetryAttempts": 5 }' ``` ```bash curl -X POST "http://localhost:6500/Api/Torrents/VerifyRegex" \ -H "Content-Type: application/json" \ -H "Cookie: .AspNetCore.Identity.Application=" \ -d '{ "magnetLink": "magnet:?xt=urn:btih:HASH", "includeRegex": "\\.(mkv|mp4|avi)$", "excludeRegex": null }' ``` -------------------------------- ### Docker Log Management Source: https://context7.com/rogerfar/rdt-client/llms.txt Commands to view Docker container logs and access the container's shell. ```bash # View logs docker logs -f rdtclient # Shell access docker exec -it rdtclient /bin/bash ``` -------------------------------- ### Retrieve User Identifiers Source: https://github.com/rogerfar/rdt-client/blob/main/README-DOCKER.md Command to determine the UID and GID for the current user to ensure correct volume permissions. ```bash $ id username uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) ``` -------------------------------- ### Configure Base URL for RDT Client Source: https://github.com/rogerfar/rdt-client/blob/main/client/src/index.html Captures the base href from the document head and stores it in the global window object. This ensures that relative paths are resolved correctly. ```javascript (function () { const baseElement = document.querySelector("base"); if (baseElement) { window["_app_base"] = baseElement.getAttribute("href"); console.log("setting base href to " + window["_app_base"]); } })(); ``` -------------------------------- ### Login with Credentials using cURL Source: https://context7.com/rogerfar/rdt-client/llms.txt Authenticate with your RDT Client credentials to obtain a session cookie for subsequent API requests. The response will include the necessary session cookie. ```bash # Login with credentials curl -X POST "http://localhost:6500/Api/Authentication/Login" -H "Content-Type: application/json" -d '{ "userName": "admin", "password": "your-secure-password" }' ``` -------------------------------- ### Test RDT Client Connection from Sonarr/Radarr Source: https://context7.com/rogerfar/rdt-client/llms.txt Commands to test the connection and verify API endpoints when integrating RDT Client with Sonarr or Radarr. ```bash # Test connection from Sonarr/Radarr server curl -X POST "http://rdtclient:6500/api/v2/auth/login" \ -d "username=admin&password=password" # Verify torrents endpoint works curl -X GET "http://rdtclient:6500/api/v2/torrents/info" \ -H "Cookie: SID=" # Categories exposed via RDT Client settings: # Settings -> General -> Categories: "sonarr,radarr,lidarr,movies,tv" ``` -------------------------------- ### SABnzbd API Emulation Source: https://context7.com/rogerfar/rdt-client/llms.txt Endpoints that emulate the SABnzbd API for usenet downloads. ```APIDOC ## SABnzbd API Emulation ### Description RDT Client emulates the SABnzbd API, providing access to usenet download functionalities. ### Endpoints All SABnzbd emulation endpoints are available at `/api` and `/sabnzbd/api`. #### GET /api?mode=version ##### Description Retrieves the SABnzbd version. ##### Parameters - **apikey** (string) - Required - Your API key. ##### Response Example ```json { "version": "4.4.0" } ``` #### GET /api?mode=queue ##### Description Retrieves the download queue. ##### Parameters - **apikey** (string) - Required - Your API key. #### GET /api?mode=history ##### Description Retrieves the download history. ##### Parameters - **apikey** (string) - Required - Your API key. #### GET /api?mode=get_cats ##### Description Retrieves the list of categories. ##### Parameters - **apikey** (string) - Required - Your API key. #### GET /api/mode=get_config ##### Description Retrieves the current configuration. ##### Parameters - **apikey** (string) - Required - Your API key. #### GET /api?mode=addurl ##### Description Adds an NZB file via URL to the download queue. ##### Parameters - **name** (string) - Required - The URL of the NZB file. - **cat** (string) - Optional - The category to assign. - **priority** (integer) - Optional - The priority of the download. - **apikey** (string) - Required - Your API key. #### POST /api?mode=addfile ##### Description Adds an NZB file via upload. ##### Parameters - **nzbfile** (file) - Required - The NZB file to upload. - **cat** (string) - Optional - The category to assign. - **apikey** (string) - Required - Your API key. #### GET /api?mode=queue&name=delete&value= ##### Description Deletes an item from the download queue. ##### Parameters - **name** (string) - Required - Set to 'delete'. - **value** (string) - Required - The NZO ID of the item to delete. - **apikey** (string) - Required - Your API key. #### GET /api?mode=fullstatus ##### Description Retrieves the full status of the download client. ##### Parameters - **apikey** (string) - Required - Your API key. ```