This bash script scans your Radarr queue for downloads that are stuck in an importPending state, attempts to resolve custom format (CF) conflicts by deleting lower-score existing files, and triggers a manual import for the newly downloaded file — automatically.
The script identifies:
- ✅ Fully downloaded episodes (
timeleft: 00:00:00) - ✅ Status:
completed - ✅ Still pending import (
trackedDownloadState: importPending) - ✅ Not blocked by fatal errors like "No files found"
- ✅ Not already imported (
hasFile: false)
If a stuck item is found, it:
- Detects if an existing episode file is blocking import due to Custom Format (CF) score.
- Deletes the existing file (if needed and allowed).
- Retries the import via Radarr's
/manualimportAPI endpoint.
Make sure the following are installed on the system running this script:
bashcurljqpython3(for URL encoding)
-
Clone or download the script
git clone https://github.com/darkatek7/arr-scripts.git cd radarr/import_stuck_items -
Edit the script
Open import_stuck_items.sh and configure these two variables:
RADARR_URL="http://localhost:8989" # Your Radarr instance
API_KEY="your-radarr-api-key" # Your API key from Radarr > Settings > General- Make the script executable
chmod +x import_stuck_items.shRun the script:
./import_stuck_items.shYou’ll see output like:
🔍 Scanning for potentially importable stuck downloads...
⚠️ Importable item possibly stuck:
ID: 123456
Title: My.Show.S01E01
Output Path: /downloads/My.Show.S01E01/
Message: Not a Custom Format upgrade...
...
✅ Episode file deleted.
✅ Manual import completed.- Skips already-imported episodes (hasFile: true)
- Auto-deletes blocking episode files if CF score is lower
- Uses Radarr’s internal manual import logic
- Output formatted for readability
- Adds a retry after deletion to allow Radarr to re-scan
- Run this script via a crontab scheduled to run every 1 hour and you won't have to worry about stuck downloads again.
- Use responsibly: the script will delete episode files if Radarr reports they are blocking an import.
- Always test with a dry run by adding the
bash import_stuck_items.sh --dry-runargument first. - Designed for Radarr v3 API.
Feel free to open an issue or pull request for improvements, bug fixes, or feature suggestions.