Skip to content

AI-powered torrent search filter for *arr apps (Radarr, Sonarr, Lidarr)

Notifications You must be signed in to change notification settings

deucebucket/ai-arr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Arr

An AI-powered torrent search filter for *arr apps (Radarr, Sonarr, Lidarr).

What it does

AI-Arr acts as a smart proxy between your *arr apps and Prowlarr/indexers. Instead of relying on basic regex matching to pick torrents, it uses a local LLM to analyze results like an experienced human would.

The AI filters out:

  • Fake files (.txt, .iso, .exe extensions)
  • Wrong languages (unless you want them)
  • Dead torrents (no seeders)
  • Suspicious file sizes (200MB "1080p BluRay" = fake)
  • Cam/telesync releases mislabeled as BluRay
  • Unknown/sketchy release groups

The AI prioritizes:

  • Known reputable release groups
  • Healthy seeder counts
  • Appropriate file sizes for quality
  • Correct language/region
  • Best quality available

Architecture

┌─────────────┐     ┌─────────────┐     ┌──────────────┐
│   Radarr    │────▶│   AI-Arr    │────▶│   Prowlarr   │
│   Sonarr    │◀────│   (proxy)   │◀────│   Indexers   │
│   Lidarr    │     └──────┬──────┘     └──────────────┘
└─────────────┘            │
                     ┌─────▼─────┐
                     │  Ollama   │ (local LLM)
                     └───────────┘

Installation

Docker (Recommended)

docker run -d \
  --name ai-arr \
  -p 9696:9696 \
  -e PROWLARR_URL=http://your-prowlarr:9696 \
  -e PROWLARR_API_KEY=your-api-key \
  -e OLLAMA_URL=http://your-ollama:11434 \
  -e OLLAMA_MODEL=qwen2.5-coder:7b \
  ghcr.io/your-username/ai-arr:latest

Manual

git clone https://github.com/your-username/ai-arr.git
cd ai-arr
pip install -r requirements.txt
cp config.example.yaml config.yaml
# Edit config.yaml with your settings
python -m src.main

Configuration

Edit config.yaml:

server:
  host: 0.0.0.0
  port: 9696

prowlarr:
  url: http://localhost:9696
  api_key: your-prowlarr-api-key

ollama:
  url: http://localhost:11434
  model: qwen2.5-coder:7b
  timeout: 30

filtering:
  min_seeders: 1
  max_results: 25
  preferred_languages:
    - english
  blocked_extensions:
    - .txt
    - .iso
    - .exe
    - .scr
  trusted_groups:
    - SPARKS
    - RARBG
    - YTS
    - YIFY
    - FGT
    - NTb
    - FLUX

Usage

  1. Install AI-Arr
  2. Point your *arr apps to AI-Arr instead of Prowlarr
  3. AI-Arr forwards requests to Prowlarr, filters results with AI, returns the best ones

In Radarr/Sonarr settings:

  • Change indexer URL from http://prowlarr:9696 to http://ai-arr:9696
  • Keep the same API key

How the AI Analyzes Releases

For each search result, the AI considers:

  1. Filename Analysis

    • Is the extension valid? (.mkv, .mp4, .avi = good, .txt, .exe = bad)
    • Does the quality tag match expectations?
    • Is it the correct content (not a similarly-named different movie)?
  2. Release Group Reputation

    • Known groups (SPARKS, RARBG, etc.) get higher scores
    • Unknown groups get scrutinized more
  3. Size Validation

    • A 1080p BluRay should be 4-15GB, not 200MB
    • 4K remux should be 40-80GB
    • Size mismatches indicate fake or low quality
  4. Health Check

    • Seeders > 0 required
    • More seeders = better availability
    • Very old torrents with few seeders may be dying
  5. Quality Hierarchy

    • Remux > BluRay > WEB-DL > WEBRip > HDTV > CAM
    • Filters out CAM/telesync unless nothing else available

API Endpoints

AI-Arr implements the Torznab API specification:

  • GET /api?t=caps - Capabilities
  • GET /api?t=search&q=... - Search
  • GET /api?t=movie&q=... - Movie search
  • GET /api?t=tvsearch&q=... - TV search
  • GET /api?t=music&q=... - Music search

License

MIT

About

AI-powered torrent search filter for *arr apps (Radarr, Sonarr, Lidarr)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published