Phase 4: authenticated PeerTube category writer

OAuth2 password-grant client for PeerTube API with token caching and
auto-refresh on 401. Pushes domain categories via PUT /api/v1/videos/{uuid}.

Includes limit parameter on push_pending for staged rollouts, and
systemic failure detection that aborts after 5 consecutive failures
(catches missing plugin or broken auth before wasting API calls).

Config section added to config.yaml for PeerTube API connection
parameters. Real credentials remain in .env (gitignored).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-04-28 00:04:51 +00:00
commit 07d26a8ef0
2 changed files with 328 additions and 0 deletions

View file

@ -408,9 +408,14 @@ service:
peertube:
api_base: http://192.168.1.170 # Internal PeerTube API (CT 110 nginx)
api_url: http://192.168.1.170:9000 # Direct PeerTube API (bypasses nginx, for writer)
host_header: stream.echo6.co # Host header for PeerTube API requests
username: root # PeerTube admin username
password_env: PEERTUBE_PASSWORD # Env var holding PeerTube admin password
public_url: https://stream.echo6.co # Public URL for video links
fetch_timeout: 30 # HTTP timeout for API/VTT requests
rate_limit_delay: 0.5 # Delay between video ingestions (seconds)
writer_rate_limit: 0.1 # Delay between category push API calls (seconds)
poll_interval: 1800 # Seconds between PeerTube acquisition polls (30 min)
scraper: