I can’t figure out how to pass arguments to a custom post processing script. Right now it just consists of:
#!/bin/bash
env > /tmp/env_var.txt
It shows a few variables without adding arguments but I need EpisodeFile_Path. Do I add “EpisodeFile_Path” to the arguments in the UI or what? I can’t seem to get it to work.
Just shows a lot of blank. The release group is the only thing that shows. My env_var.txt also only shows a handful of Sonarr variables. Should it be showing more?
On Download/On Upgrade only trigger when the file is imported by Sonarr after the episode finishes downloading (On Upgrade when it’s an upgrade for an existing file).
Right, but it’s not doing that. I do a manual search in Sonarr to test. I pick a small file to speed things up, it gets sent to the torrent program, downloads, imports, and removed from the Sonarr queue. Then I check the file and it’s blank for any “on download/upgrade” variable. It shows the event type as “grab”.
Never mind. Once it was sent to the torrent program, it would finish downloading before it ever even got to the queue in Sonarr. So it never got imported. I’ve had that issue before but only with small test files.
Is your client removing items automatically? It doesn’t matter if the download finishes before Sonarr sees it in the client as long as it stays in the client.
Yes, actually. I have a clean up script that checks via the Sonarr API if the item is gone from the queue and removes it. This normally isn’t an issue but when I use a small test file of 50-75mb the download may finish before the item gets in the queue. I’ll have to fix that somehow but I’m not sure how and it works in practice as I never actually download something that small.
Sonarr will remove a completed torrent as long as it has stopped seeding, so having your script/settings stop the torrent but not remove it should cover all cases.
If you use the Torrent Blackhole, sure? Otherwise:
If the “Completed Download Handling - Remove” option is enabled in Sonarr’s settings, Sonarr will delete the original file and torrent from your client, but only if the client reports that seeding is complete and torrent is stopped.
“Sonarr is unable to remove torrents that have finished seeding when using rTorrent”
But I have since switched to qbittorrent and I thought it was the same case but I guess not. That’s why I set it up that way to begin with instead of letting Sonarr do it but I guess I can but it back now. Thanks for pointing that out.