feat: add documentation for JDownloader integration and package naming
Some checks failed
validate / lint (push) Failing after 1s

This commit is contained in:
Nik Afiq 2026-07-26 01:47:07 +09:00
parent c625461e30
commit fb3e2976e2
2 changed files with 55 additions and 1 deletions

View File

@ -14,7 +14,7 @@ subdirectories are consumed by Argo CD Applications in `argocd/apps`.
| `gitea/` | Gitea storage, backup, public ingress, runner and OIDC/admin secrets |
| `home-services/` | HA gateway, AI gateway, Discord bot, service TLS, registry secret |
| `homeassistant/` | Home Assistant external service and ingress |
| `media/` | Jellyfin, qBittorrent, JDownloader |
| `media/` | Jellyfin, qBittorrent, JDownloader ([sending links](media/jdownloader.md)) |
| `monitoring/` | Monitoring PVs, Grafana datasource, Grafana/Auth OIDC secrets |
| `network/` | Pi-hole secrets, DDNS, Traefik dashboard, external host ingresses |
| `portfolio/` | Portfolio deployment, ingress, registry pull secret |

View File

@ -0,0 +1,54 @@
# Sending links to JDownloader
`jdownloader` (`manifests/media/jdownloader.yaml`) runs a `cnl-bridge` sidecar
that accepts a URL over HTTP and writes it as a `.crawljob` for JDownloader's
FolderWatch extension to pick up. This exists because all containers in the
pod share one network namespace, so JDownloader's own built-in Click'n'Load2
listener (which also defaults to port 9666) can't be reached independently
from outside the pod for this purpose.
## Endpoint
```
POST https://jdownloader.home.arpa/add
Content-Type: application/x-www-form-urlencoded
urls=<the download URL>
```
Example:
```bash
curl -X POST https://jdownloader.home.arpa/add \
--data-urlencode "urls=https://ash-speed.hetzner.com/100MB.bin"
```
A `200 Ok.` response means the bridge wrote the `.crawljob` file.
JDownloader's FolderWatch extension polls every ~10s, picks it up, and adds it
directly to the Downloads list — both `autoStart` and `autoConfirm` are set,
so it starts downloading without needing manual confirmation in the
LinkGrabber tab.
## Package naming
The package name is derived automatically from the URL: the last path
segment, with everything from the first `.` onward stripped — so
multi-extension names collapse to the base identifier.
| URL | Package name |
| --- | --- |
| `https://ash-speed.hetzner.com/100MB.bin` | `100MB` |
| `https://example.com/abcdefg/1234567.mp4.html` | `1234567` |
Falls back to `subyshare` if the URL has no usable path segment.
## Notes
- Only the first `urls` value in the POST body is used — one link per request.
- The bridge listens on container port `9667` internally; the `Service`
exposes it externally as port `9666` (`targetPort: 9667`), so callers of
`/add` are unaffected by the internal port. The indirection exists because
JDownloader's own CNL2 listener already binds `9666` inside the shared pod
network namespace.
- Source: the inline Python script in the `cnl-bridge` container of
`manifests/media/jdownloader.yaml`.