- Rust 99.4%
- Dockerfile 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .dockerignore | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
TorrentClaw RSS
Small Torznab adapter for TorrentClaw public metadata. It does not use a TorrentClaw account, cookies, API key, or the protected TorrentClaw Torznab endpoint. Written in Rust (axum + tokio, zero unsafe, no unwraps on untrusted input).
Live service on Hazel (both root and /tc-rss routes are supported):
http://torrentclaw.internal:3000/
http://torrentclaw.internal:3000/api?t=tvsearch&q=Scooby-Doo
Deploy only this service, without deploying the retired Arr stack:
uc deploy -f media/torrenting/torrentclaw-rss/docker-compose.yml torrentclaw -y
The Compose file pins the service and persistent cache volume to Hazel.
If Docker's isolated build network cannot resolve crates.io (as on the current NixOS workstation), build using the host network, push the image, and deploy without rebuilding. This does not change the runtime container's networking:
docker build --network=host -t torrentclaw-rss/torrentclaw:2026-10-04-parser-cache media/torrenting/torrentclaw-rss
uc image push torrentclaw-rss/torrentclaw:2026-10-04-parser-cache -m hazel
uc deploy --no-build -f media/torrenting/torrentclaw-rss/docker-compose.yml torrentclaw -y
Prowlarr generic Torznab settings:
Name: TorrentClaw RSS
Base URL: http://torrentclaw.internal:3000/tc-rss
API path: /api
Priority: 25
Minimum seeders: 1
Prefer magnet URLs: enabled
Seed time: unset
Season pack seed time: unset
Seed ratio: unset
Prowlarr currently rejects 0 for both seed-time fields with Should be greater than zero, so the deployed indexer leaves them unset rather than using direct database edits.
Run locally:
BASE_PATH=/tc-rss \
PUBLIC_BASE_URL=https://juniper.ocean.usbx.me/tc-rss \
PORT=3737 \
cargo run --release
Useful checks:
curl -fsS http://127.0.0.1:3737/tc-rss/health
curl -fsS 'http://127.0.0.1:3737/tc-rss/api?t=caps'
curl -fsS 'http://127.0.0.1:3737/tc-rss/api?t=movie&q=The%20Matrix'
curl -fsS 'http://127.0.0.1:3737/tc-rss/api?t=tvsearch&q=Rick%20and%20Morty%20S09E07&season=9&ep=7'
Tests:
cargo test
Environment:
BASE_PATH=/tc-rss
PUBLIC_BASE_URL=https://juniper.ocean.usbx.me/tc-rss
PORT=3000
UPSTREAM_TIMEOUT_MS=15000
CACHE_DIR=/var/cache/torrentclaw
CACHE_TTL_MS=21600000
CACHE_STALE_TTL_MS=86400000
CACHE_MAX_ENTRIES=128
UPSTREAM_MIN_INTERVAL_MS=3000
UPSTREAM_COOLDOWN_MS=300000
MAX_SUGGESTIONS=4
MAX_RESULTS=100
RSS_DETAIL_LIMIT=8
DETAIL_CONCURRENCY=2
ALLOW_DANGEROUS=false
MAGNET_TRACKERS=udp://tracker.opentrackr.org:1337/announce,...
Upstream limits and caching
The adapter does not bypass or remove TorrentClaw's upstream limits. All cache misses share one serialized request budget (one request every 3 seconds by default), including detail fetches from simultaneous searches. Concurrent requests for the same URL share a single upstream fetch. Fresh cache hits make no upstream requests.
Responses are cached for 6 hours, with up to 24 additional hours of stale data
available during upstream failures/cooldowns. The cache and cooldown state
persist across container replacements. Memory/disk entries and response sizes
are bounded. /health reports request, cache-hit and stale-hit counters,
upstream busy state, last error and cooldown remaining; cached seed counts can
therefore be older than the live tracker.
HTTP 429 and advertised budget exhaustion activate a shared cooldown. Both
numeric and HTTP-date Retry-After, and X-RateLimit-Reset, are respected;
repeated limits without guidance use exponential backoff. There are no automatic
retry storms. Uncached failures return HTTP 503/502 with a Torznab <error> and,
when applicable, Retry-After, rather than an HTTP-200 empty RSS feed. Successful
stale-cache responses remain HTTP 200.
The detail parser skips seed-count summary arrays and selects the first usable
release array, without mixing in related titles. Torznab language attributes
come only from explicit audioTracks metadata, never subtitle languages or an
ambiguous filename. Missing language metadata remains unknown.
Tests cover parser regressions, audio/subtitle separation, request pacing, concurrent fetch deduplication, bounded/persistent caching, cooldown persistence, header handling, schema changes, and API error responses.