Monitor and compare expected vs actual quality scores for Radarr/Sonarr downloads.
Qualitarr helps you ensure that the files grabbed by Radarr/Sonarr match the expected custom format scores. When a mismatch is detected, it applies a tag and sends a Discord notification.
- Auto-detect mode: Run as a Radarr/Sonarr Custom Script triggered on import
- Batch mode: Process all unchecked movies with a dual-queue system
- Score comparison: Compare expected vs actual custom format scores
- Tagging: Automatically tag movies based on score match/mismatch
- Discord notifications: Get notified when score mismatches are detected
- Configurable tolerance: Score is acceptable if actual is between (expected - maxUnderScore) and (expected + maxOverScore)
# Clone the repository
git clone https://github.com/yourusername/qualitarr.git
cd qualitarr
# Install dependencies
npm install
# Build
npm run build
# Copy and edit configuration
cp config.example.yaml config.yaml# Radarr configuration
radarr:
url: "http://localhost:7878"
apiKey: "your-radarr-api-key"
api: # Optional API settings
timeoutMs: 30000 # Request timeout (default: 30000)
retryAttempts: 3 # Retry on failure (default: 3)
retryDelayMs: 1000 # Initial retry delay (default: 1000)
# Discord webhook notifications
discord:
enabled: true
webhookUrl: "https://discord.com/api/webhooks/..."
# Tag settings
tag:
enabled: true
successTag: "check_ok" # Applied when score matches
mismatchTag: "quality-mismatch" # Applied when score differs
# Quality settings
quality:
maxOverScore: 100 # Max allowed above expected
maxUnderScore: 0 # Max allowed below expected (0 = must be >= expected)
# Batch mode settings
batch:
maxConcurrentDownloads: 3
searchIntervalSeconds: 30
downloadCheckIntervalSeconds: 10
downloadTimeoutMinutes: 60
# Advanced polling/timeout settings (optional)
commandTimeoutMs: 60000 # Search command timeout (ms)
commandPollIntervalMs: 2000 # Command status polling (ms)
grabWaitTimeoutMs: 30000 # Grab event timeout (ms)
historyPollIntervalMs: 3000 # History polling interval (ms)- In Radarr, go to Settings > Connect > + > Custom Script
- Set the path to the
qualitarrbinary - Select On Import as the trigger
- Save
When a file is imported, Qualitarr will automatically:
- Compare the grabbed score with the imported score
- Apply the appropriate tag (
check_okorquality-mismatch) - Send a Discord notification if there's a mismatch
Process all movies that haven't been checked yet:
qualitarr batchThis mode uses a dual-queue system:
- Search Queue: All movies without the success tag
- Download Queue: Limited concurrent downloads (configurable)
The batch process:
- Fetches all movies without
check_okorquality-mismatchtags - Triggers searches with configurable delays between each
- Monitors downloads in parallel (limited concurrency)
- Checks scores and applies tags as downloads complete
Search for a specific movie by TMDB ID (visible in the Radarr URL):
# TMDB ID is the number in the Radarr URL: /movie/550
qualitarr search 550Usage:
qualitarr [command] [options]
Commands:
(no command) Auto-detect mode from Radarr/Sonarr environment variables
batch Process all movies without success tag
search <tmdb-id> Search for a specific movie by TMDB ID
Options:
-c, --config <path> Path to config file (default: ./config.yaml)
-v, --verbose Enable verbose logging
-n, --dry-run Dry run mode (no searches, no tags, only logs)
-h, --help Show this help message
--version Show version
Qualitarr compares the grabbed score (what Radarr expected when it grabbed the release) with the current file score. This detects cases where the imported file doesn't match the expected custom format score.
A score is considered acceptable if the actual score is between expected - maxUnderScore (default: 0) and expected + maxOverScore (default: 100). Scores outside this range are considered mismatches.
- Trigger search: Tell Radarr to search for the movie
- Wait for grab: Monitor for the grabbed event and record its custom format score
- Wait for import: Monitor for the file to be imported
- Compare scores: Compare grabbed score vs current file score
- Take action: Apply tags and send Discord notifications based on the result
- Node.js >= 20.0.0
- Radarr v3+ (Sonarr support coming soon)
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Run tests
npm test
# Run tests once
npm run test:run
# Run tests with coverage
npm run test:coverage
# Lint
npm run lint
# Format
npm run formatMIT