Sonarr/Radarr-autodl-irssi script

  1. Home
  2. Knowledge Base
  3. Applications
  4. Sonarr/Radarr
  5. Sonarr/Radarr-autodl-irssi script

If you use Sonarr or Radarr to download movies and TV shows automatically and would like the download to be faster, perhaps to be there on the early seed or you just want to wait less before watching, you can do so by making autodl-irssi in ruTorrent work together with Sonarr and Radarr. autodl-irssi works by monitoring IRC announcements, these happen right as something is uploaded, the script then sends these announcements as soon as they are published to Sonarr/Radarr to check if it matches anything currently monitored and not downloaded. I will attempt to guide you through setting up said script, courtesy and credit to Tawm.

First we want to get the App Port and API Key for the applications we are connecting to autodl-irssi, you can find these in Apps Dashboard.

Then in Service Control you scroll down till you find Radarr/Sonarr and you copy their App Port and API Key.

Once you have this information it is finally time to make the script, You can name it anything but for the sake of this guide we will name it

To start, run the following command, replacing username with your own username:

nano /home/username/

Note: This script is identical for both Radarr and Sonarr but requires 2 separate files as the URL in the script is where matches are sent.

At the end of this script you will see:|radarr/api/release/push
Replace the bolded port with the information you found in App Dashboard and remove either sonarr or radarr as well as the | as this is just a separator used as a visual example.


date=$(date -u +"%Y-%m-%d %H:%M:%SZ")

/usr/bin/curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $apiKey" -X POST -d '{"title":"'"$title"'","downloadUrl":"'"$downloadUrl"'","downloadProtocol":"torrent","publishDate":"'"$date"'"}'|radarr/api/release/push
} &> /dev/null

Once you’ve made the relevant changes, paste the code into the SSH terminal.

After you have made the script we will have to allow it to be executed, run this command and remember to replace username with your username.

chmod +x /home/username/

Now that we have created this lovely script on your server and given it permission to run, we will need to connect it all together. In ruTorrent open autodl filters in the webui and create a new one. Then in Action choose Run Program and paste the location for the script in the command field. In Arguments paste this replacing Radarr/SonarrAPI with your api key plainly, the “$(TorrentName)” and “$(TorrentUrl)” is an autodl filter that allows it input that info into the script we just made.

"$(TorrentName)" "$(TorrentUrl)" Radarr/SonarrAPI

After you have done this you just leave the other fields blank, you can add resolution filters if you wish and of course which sites/IRC servers to monitor as usual, but leave the Match Releases and TV Show/Movie fields empty, that way it will send all to Sonarr or Radarr. Don’t worry it will only download if it is a match for a monitored Movie/TV Show

If this was successful, you will see the following when autodl-irssi matches something and sends it to Radarr/Sonarr in the logs

Was this article helpful?

Reader Interactions

On Friday, March 29, 2019 all License Keys previous to the new API system will be expired.