Moving episodes instead of copying

So I have a weird issue, ive used sonarr with transmission and plex for ages now and I love it although recently I upgraded my server and had to reconfigure everything so I’ve messed something up somewhere and I can’t figure out where.

My box runs freenas and I wrote a little script that transmission calls when a download completes, it extracts any rars and lets sonarr know where to check, its been working beautifully up until I had to set everything back up, basically what’s happening is that sonarr is moving the downloads to the tv show folder instead of copying them like it used to and its messing up my seeding ratio, i’ve checked everywhere I can think of, hard links is on, any help would be really appreciated

The strange thing is it’s only doing it with episodes that are not rar’d

Are you passing the torrent hash with the command telling Sonarr where to import it from? If not Sonarr doesn’t know that the download is seeding and the default behaviour is to move, not copy/hardlink.

Thanks for the quick reply, I didn’t expect one that fast

I’m passing it the path, I’m not sure if that’s enough but it’s has worked up until now which makes me think its not the script

http://${sonarr}/api/command" -X POST -d “{“name”: “downloadedepisodesscan”, “path”: “${folder}”}” --header "X-Api-Key:${sonarrapi}

With just the path Sonarr will only ever move files and it doesn’t know whether the files it is importing belong to a seeding torrent or are just files in a folder. If your script extracts to the same folder that Transmission reports to Sonarr then Sonarr can automatically import it and will know that it is still seeding, otherwise the script needs to pass the torrent hash and the downloadClientId so Sonarr can make an informed decision whether to move or copy/hardlink.

This behaviour hasn’t changed recently so I’m not sure how it was working before and is failing.

do I pass the torrent id or the torrent has to downloadClientId? the script does extract to the same folder and they both point to the same path, is there a better way to do it than I am? can I just tell Sonarr to check the recently completed torrent again

Sonarr will automatically reprocess the folder periodically, so just letting it import on it’s own should take care of it.

Torrent hash is the downloadClientId with torrent clients.

I tried passing the torrent hash although I received this error

External directory scan request for unknown download bed965e2fe7d119b406ce75fda773f63bd122ce9, attempting normal import. [/media/Lindsay/Complete/Grimm.S06E02.HDTV.x264-FLEET/]

I then tried the ID just in case and it gave me this;

External directory scan request for unknown download 67, attempting normal import. [/media/Lindsay/Complete/Grimm.S06E02.HDTV.x264-FLEET/]

how long does it take Sonarr to rescan once the rar has been extracted? it’s is extracted as soon as the download completes but i guess Sonarr scans before the extraction is complete

It runs every minute and new jobs are queued every 30 seconds, so every 90 seconds or so it will execute.

so i tried removing the line from my script that tells Sonarr there’s an episode to look for but now when I download a rar’d file Sonarr just says episode is downloading 100% and doesn’t try to process it, it’s an mkv asn its extracted fine in the download folder, its been about an hour now since it was extracted/downloaded

What does Sonarr think is there? (Activity Queue will give a brief message about it if you hover over the icon).

Hey Markus,

I’ve had a hell of a time with my server through no fault of Sonarr, finally back up and running so sorry for the delay I appreciated the help!

So even after doing a fresh Sonarr install it was still doing the same, my script obviously wasn’t running properly in the past but it is now and it was causing the issues, I just added importMode: Copy and that did the trick, everything is working perfect now.

I just wanted to say thanks for the help and for Sonarr! its genuinely amazing, ties all of my software in seamlessly, my favourite software in my entire setup, Thanks guys

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.