Skip to content

feat: auto quality profile switch#2

Open
mvanbaak wants to merge 3 commits into
mainfrom
feat/auto-quality-switch
Open

feat: auto quality profile switch#2
mvanbaak wants to merge 3 commits into
mainfrom
feat/auto-quality-switch

Conversation

@mvanbaak

@mvanbaak mvanbaak commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Dynamic P95 threshold script that detects movies unlikely to get physical release and switches them to WebDL profile + triggers search.

  • Dynamic P95 threshold computed from library's own web→physical gap distribution (IQR outlier filtering)
  • Profile resolution from Radarr API by name
  • Candidate matching: hasFile==false, monitored==true, profile match, past threshold
  • Dry-run default; --apply to execute
  • Batch limiting via MAX_SWITCH_PER_RUN
  • Radarr search trigger after switch (TRIGGER_SEARCH)
  • Pretty table output + JSON mode (--json)
  • Config: SOURCE_PROFILE_NAME, TARGET_PROFILE_NAME, P_VALUE, MIN_SAMPLE, FALLBACK_THRESHOLD, MIN_THRESHOLD, MAX_THRESHOLD, MAX_SWITCH_PER_RUN, TRIGGER_SEARCH

mvanbaak added 3 commits July 2, 2026 23:00
- docs/quality-switch-spec.md: full spec for auto quality profile switch
  script — problem statement, research summary, algorithm, config
  knobs, edge cases, implementation plan
- radarr/research/release_date_stats.sh: research tool for analyzing
  release date distribution, stored in research/ directory to signal
  it's an analysis tool, not a production Connect script
- Add hasFile and monitored filters to candidate criteria
- Inline actual jq code for threshold computation (no external refs)
- Define DRY_RUN vs --apply flag precedence
- Add scripts.conf.sample update as Phase 1 deliverable
- Remove column -t dependency, use printf formatting instead
- Document POST /api/v3/command success criteria (HTTP 200 + jobId)
- Document load_config optional path argument and working example
- Note index-based percentile approximation method
- Add --json vs --quiet output precedence rules
radarr/auto_quality_switch.sh:
- Dynamic P95 threshold computation via IQR-filtered web->physical gap
- Profile resolution from Radarr API by name
- Candidate matching with hasFile, monitored, qualityProfileId filters
- Dry-run default, --apply to execute
- Batch limiting via MAX_SWITCH_PER_RUN
- Radarr search trigger after switch (TRIGGER_SEARCH)
- Pretty table output + JSON mode (--json)
- All config overridable in scripts.conf

radarr/connect/scripts.conf.sample: add auto quality switch vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant