Delay Completed Download Handling

Hello,

I would like the ability to delay the import of the file from the downloads section into their correct designated folder. The reason being is that the location where the files are being originally downloaded to an external server and every X minutes downloaded shows are moved from the external server onto the local server. However, there are situations where Sonarr attempts to import the file as it is being transferred which causes errors in the file (Part of the show is just cut out or it becomes unplayable after a random duration of time). Having the ability to delay this import an amount of time should resolve this issue.

1 Like

What if you delay for 10 minutes and it takes 11 to transfer? What if there are multiple files and only some are transferred?

We do not have plans for a delay, you’ll want to sync to another directory and move to the location Sonarr is monitoring after all files are complete or mount the remote storage and have Sonarr import from there (sshfs or similar).

Fair points. I would have to choose a value that would make the most sense that would not cause conflicts like that.

However as you have stated there are no plans for this functionality I will look into the other options.

Which method of transfer do you use? The approach should be to transfer to a temp folder, then move to the correct one.

I also have some ideas about detecting transfers, but that didn’t make the cut yet and we were done with pushing v3 back.

I don’t have many options from the seedbox available to me sadly. As of right now I am just running a script every 10 minutes that checks a folder on the seedbox for files and if anything is within it, it moves the files via sftp into a sync directory on the local machine in which Sonarr is looking for the files to import.

I did do the temp folder to import folder for a short time and have a script running to check the temp folder and move the files as you stated but it seemed convoluted and I was trying to find a different solution.

Understanding that they are two completely separate things and two different development plans, Radarr recently provided the option to delay imports and after enabling this function and giving it a delay of 45 minutes (total overkill) I have not had that issue.

1 Like

Which OS is the local machine (the one sonarr is running on)?

From what I undestand, that script is running on the local machine. If so then yes, transfer to sync_temp and follow that up with a move to sync. It should be doable in a single script.

Best approach is to mount the seedbox storage locally. Given you’re already using sftp that should be possible. But how easy it is depends on the OS.

In the future we’ll probably be able to deal with these scenarios more gracefully.

Thanks @Taloth

The local machine is running Unraid so Sonarr is running as a docker within that. As mounting would be easier to do the seedbox that I am using does not support sshfs.

I will go back to your original statement and add on another pass on my current script that pulls the files down to move them to an import folder. Keeping in mind that this script checks the file for the last time it was modified and if it has been modified in the last minute it does not move the file. This is how I get around the issue of a transferring file being moved.

You said you’re using sftp right now, sshfs uses sftp. Is there something the seedbox provider did to block you from using sshfs clientside?

That’s what I’m planning for Sonarr itself as well. But any top level file or folder is considered a job, and if anything inside the job was recently modified then the whole job should be considered pending. This is particularly important for season packs.

I know I was expecting it to work easily considering other functions of ssh function properly. It may be a me thing not properly configuring it but it seems very straight forward. Not a lot of documentation with dediseed on what is supported or not.

Your plan for the pending jobs also makes a lot of sense. I could definitely see the season packs requiring this.

I will continue to try and get sshfs functioning or just work back with the script.

If you hit a wall with sshfs, hop on discord, there are a few people that use it already.
It should work, it won’t be super fast though coz that generally requires ssh patches, but if you’re using sftp atm then it’s exactly the same.

Good luck :smile:

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