My original post for my questions are here:
I found it rather difficult to find all the issues I was experience in just one full guide so I decided to consolidate all my findings in to one post that people can search on.
Things I’ve learned
(useful for other people who may experience the same issue)
- If you are having issues connecting to Deluge from Sonarr and it keeps saying the test is unsuccessful, update Deluge! I didn’t think about this and spent way too much time trying to troubleshoot the connection issue.
- (not recommended) Temp fix for rar files is to just extract it manually and dump the video file in to the drone factory folder. Then delete the torrent and the original data files after seeding.
- Debug or trace log option! It helps a lot in figuring out the issue of why importing shows was failing! You can find it in the general tab for settings.
- CDH doesn’t seem to remove torrents unless you enable “Auto Managed” for the label of your downloads. It also checks to see if the seed ratio is met for the downloads that match the label you set up in the Deluge download client (inside Sonarr → Download Clients).
- CDH can’t detect rar files very well so you have to extract them via a script and dump it in your drone import folder. Do not dump it inside the downloads folder or else CDH won’t be able to clean up properly after the torrent is finished seeding. In my case it shows that the download is stuck at 100%.
- If you use IPTorrents to download shows, it tends to always come zipped along with a sample file. This tends not to play nice with CDH so it’s best to move to a different source that doesn’t use zipped files. This is later solved by using an extraction script that will be described below.
My Configuration
Sonarr Settings
- My indexers are IPTorrents and KickassTorrents. IPTorrents is enabled for RSS (https://iptorrents.com/getrss.php) as they have great and fast download speeds on new releases. KickassTorrents is used with search enabled so that I can find missing episodes in my collection.
- For settings → media management I have Hardlinks instead of copy turned on.
- For settings → Download Clients I have Deluge added with the following settings [host = localhost, port = 8112( default), category = tv-shows]
- I also have Completed and Failed Download Handling enabled and remove set to yes.
- I have drone factory enabled at 5 minute intervals and pointed to a import_media folder (will reference this later in Deluge configurations.
- In Connect I had XBMC (now Kodi) setup but realized it has to be running at all times for it to work. Since I don’t like errors in my logs I ended up just removing it from Sonarr.
- In settings → General I have turned on authentication (I’ve allowed Sonarr though my firewall so I can access it outside of my house)
Deluge Settings
- Plugins I have enabled are AutoAdd (I have a drop folder to import items), Execute (will talk about this later), Label (needed for Sonarr),.
- For labels I have one created called tv-shows matching what I configured for Sonarr earlier. Under that label option I have apply queue settings enabled along with auto managed and a stop seed ratio of 1.5. I did not need to check remove at ratio as Sonarr will handle it. (option setting) You can apply a location setting for completed downloads if you prefer.
- Now the best part. As you read in my earlier “Things I’ve Learned” blurb, CDH doesn’t work well with RAR files. So when a download completes in Deluge, it will seem like it’s stuck at 100% forever within Sonarr. To fix this you have to extract the rar file and put it in to the drone import folder configured in Sonarr. This will allow Sonarr to pick up the file and it will mark the torrent as downloaded/imported! It was also still remove and clean up everything properly when the seed ratio is met. To do this save the code below as a bat file, update it with your configuration, then add a new task in the Execute option in Deluge to run the script you just saved:
@echo off
:: sets environment variables
set torrentpath=%3
set torrentname=%2
set zipper=“C:\Program Files\7-Zip\7z.exe”
set dest=“your drone factory path here”
set logfile=“C:\ExtractLog.txt”
:: waits 10 seconds before extracting in case folder/files are being moved to completed directory
ping 192.0.2.2 -n 1 -w 10000 > nul
:: extact the file/files to destination
:: checks rar
IF EXIST “%torrentpath%*.rar” (@echo %zipper% x “%torrentpath%*.rar” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%*.rar” (%zipper% x “%torrentpath%*.rar” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname:~1,-1%*.rar” (@echo %zipper% x “%torrentpath%%torrentname:~1,-1%*.rar” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname:~1,-1%*.rar” (%zipper% x “%torrentpath%%torrentname:~1,-1%*.rar” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname%*.rar” (@echo %zipper% x “%torrentpath%%torrentname%*.rar” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname%*.rar” (%zipper% x “%torrentpath%%torrentname%*.rar” -o%dest% >> %logfile%)
:: checks zip
IF EXIST “%torrentpath%*.zip” (@echo %zipper% x “%torrentpath%*.zip” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%*.zip” (%zipper% x “%torrentpath%*.zip” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname:~1,-1%*.zip” (@echo %zipper% x “%torrentpath%%torrentname:~1,-1%*.zip” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname:~1,-1%*.zip” (%zipper% x “%torrentpath%%torrentname:~1,-1%*.zip” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname%*.zip” (@echo %zipper% x “%torrentpath%%torrentname%*.zip” -o%dest% >> %logfile%)
IF EXIST “%torrentpath%%torrentname%*.zip” (%zipper% x “%torrentpath%%torrentname%*.zip” -o%dest% >> %logfile%)
Credit goes to @danmed for the initial build. I’ve just cleaned it up and added conditional statement so that the log won’t be filled with junk.
Hope that helps some fellows out! I’m enjoying my setup now that it’s all working. A shout out to @markus101 for all the help and quick responses.