Files
claude-projects/claude-config/config/prompts/media-pipeline/R-ACQ_source_reacquisition_research.md
T
2026-10-02 00:19:54 -05:00

4.4 KiB

R-ACQ — research: automatic source re-acquisition for media_pipeline (spawned 2026-10-01, main session 771b2744)

Bounded RESEARCH agent. Budget: --max-turns 40. Read-only on the homelab; web research allowed (WebSearch/WebFetch). Same tool call twice with identical arguments → STOP with a partial wrap-up.

OWNER REQUEST (2026-10-01 21:17, paraphrased faithfully): when the pipeline needs a source file that no longer exists (e.g. a library file was damaged and must be re-transcoded), it should be able to download the source on its own. If autobrr grabbed it originally, autobrr (or its history) can re-grab it; but manually-downloaded sources won't have that, and the owner will soon start DELETING the saved .torrent files, so re-adding to qui/qBittorrent by hand won't work either. Needed: a way to search + fetch from the owner's sites by API/webhook/etc. If no API exists, the owner is open to building one (the API-business skills apply; it would be personal/non-commercial use). Owner's sites — now: nyaa.si and animebytes.tv (anime), eztv (TV), https://rarbg.torrentsbay.org/ (TV + movies). Near future: TorrentLeech, IPTorrents (TV + movies). Far future: PassThePopcorn (movies), BroadcasTheNet (TV).

QUESTIONS TO ANSWER (with sources/links for every claim; mark anything unverified):

  1. Per site: official API? (search + download .torrent/magnet), RSS, auth model (passkey/API key/cookie), rate limits, rules on automated access (private-tracker ToS: API/automation allowed? ratio/H&R implications of re-grabs), whether Prowlarr and/or Jackett have a maintained indexer definition for it (and its status), and for the rarbg.torrentsbay.org mirror: what it actually is (legitimacy, stability, malware risk) — flag clearly if it is a sketchy clone.
  2. Indexer managers: Prowlarr vs Jackett — Torznab API, how a custom service queries it (search by title + season/episode/absolute number, by IMDb/TVDB/AniDB ids), sync to Sonarr/Radarr, Docker images (linuxserver.io first per homelab rules), auth, resource use.
  3. Whole-stack option: Sonarr (TV/anime) + Radarr (movies) behind Prowlarr — they already implement "search for a missing/damaged episode and grab the best release" (incl. anime absolute numbering, release profiles). How would they coexist with the owner's existing pipeline (autobrr → qBittorrent/qui → media-downloader-local → media-transcoder → FileBot → Jellyfin)? Would Sonarr replace FileBot naming or sit beside it? What's the minimum integration where media_pipeline calls Prowlarr directly (search → pick → push to qBittorrent with a category the downloader already watches) without adopting Sonarr/Radarr?
  4. Release identity: what should the pipeline STORE at download time so an exact re-grab is possible later without the .torrent file (infohash, release name, indexer + guid, AniDB/TVDB ids)? Check the homelab DB: PG=$(docker ps --format '{{.Names}}' | grep '^postgres-'); docker exec "$PG" psql -U postgres -d media_pipeline -c "\d download_jobs" (and \dt) — read-only — and say what is already captured vs missing. Check what autobrr's own history/API exposes (container docker ps | grep -i autobrr, read-only inspect; do NOT read its secrets).
  5. Build-our-own option: only where no indexer definition/API exists — a minimal scraper/API (legal + ToS caveats, maintenance cost), and whether a Prowlarr custom (Cardigann YAML) definition is the cheaper "build our own". DELIVERABLE: /opt/appdata/docker/research/source_reacquisition_2026-10-01.md — per-site table (API, RSS, Prowlarr/Jackett support, automation allowed?, notes), the options compared (A: Prowlarr-only minimal integration; B: Prowlarr + Sonarr/Radarr; C: custom), a RECOMMENDATION with phased build steps, what to start storing now (schema additions), risks (private-tracker rules, ratio), and an UNVERIFIED list. Follow the 30-min gotcha-spike spirit: name the 3 most likely gotchas. HARD RULES: no installs, no container changes, no DB writes, no git, no sudo, no account sign-ups, no logging into any site. Mask secrets. Never read .env files or credentials. PERSIST: append a dated row to /opt/appdata/docker/research/INDEX.md if that file exists. FINAL message = wrap-up JSON only: status, report_path, recommendation (one paragraph), per_site[] (site, api, prowlarr, jackett, automation_allowed, notes), store_now[] (field, why), gotchas[3], unverified[], next_step.