A simple Python script to track failed and successful grabs per indexer. Currently works with Sonarr and Radarr only.
Prowlarr doesn’t track failed grabs, and when you remove movies or shows from Radarr/Sonarr, their associated stats vanish too.
Statistarr solves that by:
- Fetching your history via the API
- Logging grab stats per indexer
- Saving it to a persistent
JSON
file
Note
Stats may be inaccurate at first, not because the script starts fresh, but because Radarr and Sonarr delete history data for any shows or movies you’ve removed. Once something is gone, so is its history — meaning the script has nothing to track for it. Let the script run continuously from now on, and over time you'll build a more complete picture of how each indexer performs.
Honestly? It’s a messy little script mostly written by ChatGPT.
It:
- Calls the
v3/history
API - Filters and processes events
- Notes the latest event date
- Saves stats in a
JSON
file - Merges new stats with older ones (so historical data isn’t lost)
First-time run might take a while depending on how big your history is.
It's not perfect—bugs may exist. Feel free to open an issue if something breaks.
Requirements
- Python 3 (tested on
3.13.3
) pip
- Install dependencies:
pip install requests quickchart.io pyinstaller pystray apscheduler psutil
Tip
Keep all script files in one separate directory for smoother execution.
Moving ahead:
- Download all the files from
script
folder. - Rename
config.json.example
toconfig.json
. - Fill in your API details inside
config.json
.
(Optional) To redact specific indexer names for public sharing, edit the json accordingly:
{
"Statistarr": ...,
"Quickchart": {
"redacted": ["Indexer_name", ...]
}
}
- Build executables using
pyinstaller
or download pre-built executables (Windows only) from Releases page:
Pre-built executables have been created in github actions.
pyinstaller --onefile --noconsole fetcher.py
pyinstaller --onefile --noconsole tray.py
- Get the executables from
dist
and place them back in parent folder. Clean up extra files from pyinstaller.
Important
PyInstaller executables may trigger false positives in antivirus tools or VirusTotal. This is a known issue and not unique to this project.
- Run
tray.exe
(or whatever executable you end up with)
Expected directory structure:
Statistarr/
|- cchart.py
|- config.json
|- fetcher.exe
|- fetcher.py (optional, helpful for debugging code yourself)
|- icon.ico
|- statistarr.py
|- tray.exe
|- tray.py (optional, helpful for debugging code yourself)
|- backup/ (created later by app)
|- error.log (created later by app)
|- Stats *.json (created later by app)
|- untracked.log (created later by app)
Tip
Add tray.exe to startup app.
statistarr.py
– Prints readable output to the terminal.fetcher.py
– Runs quietly in the background (when used as an app) to fetch history and create JSON dump.cchart.py
– Uses QuickChart.io to display your collected stats in a simple graph or chart.tray.py
– Creates tray icon.
(Indexers have been blurred to protect the innocent 😭)
Note
Failure Rate = Failed Grabs ÷ (Successful Grabs + Failed Grabs)
- ChatGPT – For assembling most of this script
- @typpo – For quickchart-python library
- @moses-palmer – For pystray library
- @agronholm – For apscheduler library
- @giampaolo – For psutil library
- @psf – For requests library
- Icon downloaded off Freepik, made by logisstudio1
You're probably right.
I’m just a biotech student fiddling around—this isn’t meant to be elegant or production-grade. But hey, if it helps you track bad indexers, mission accomplished.
Feel free to open issues, submit PRs, or fork and improve!