Sonarr: Transfer provider

Created on 1 Apr 2015  Â·  8Comments  Â·  Source: Sonarr/Sonarr

Add transfer providers to deal with remote setups, supporting rsync, btsync and others. These providers must be async and have progress status so it can be safely hooked into CDH.

enhancement

Most helpful comment

I am currently using Seedsync for this. https://github.com/ipsingh06/seedsync

My torrent client upon completion of the download, creates a hardlink on my seedbox /downloads/complete/
Seedsync watches the /downloads/complete directory and auto downloads and extracts everything on that directory locally to my NAS in /downloads/seedsync/
I have remove path mapping setup in Sonarr and it picks up individual episodes with no issues.

TV Packs are still an issue since sonnar only see's the one entry in the download client, so I usually have to import manually.

All 8 comments

Comment from taloth on Trello:

Some things to decide on:
Add Transfer provider to individual download clients, or globally in place of Remote Path Mapping? Either way it needs to be called from the the DownloadClient instances in Sonarr so we can report progress to queue.

I use at the moment syncthing with remote path mapping. After the torrent is finished the client via script replicates the torrent folder with the extracted file or a hardlink (in case is not rar's) in a syncthing folder.
At the local side sonarr scans the correct mapped path, but complains for several minutes no video files are for import, until sync is finished and syncthing removes the beginning of the file ".syncthing" and the .tmp extension, then sonarr proceeds with the import.

The reading of those extensions can be added to sonarr so it reports is waiting for incoming files, btsync does something similar. I have not tested this with a full season pack.

Another thing what about scp? i've found only this on google for C# http://www.tamirgal.com/blog/page/SharpSSH.aspx all the others i've found were paid libraries.

I'm using BTSync with a similar setup. For single episodes it works well. Sonarr waits for the files to be synced before importing them.

But for season packs it's broken because Sonarr will import the first episode that's grabbed by BTSync, then can't find anything else to import in the season pack folder and removes the whole folder (automatic termination cleanup). So the other episodes that we being synced are deleted on the other side too and I have to grab them again (and they will downloaded one by one because the season already has one episode, so the season pack will be ignored).

I haven't figured out a way to prevent this behavior (preventing the automatic deletion?).

The issue being that Sonarr doesn't know that more files are on their way, a couple possible workarounds:

  • Sync to another folder then move the files after the sync completes
  • Prevent Sonarr from seeing any file in the folder until all have synced, Sonarr will see an empty folder and try again.

From the forums:

Exposing a “Force Move” advanced option would help many torrent users who do their own post-download processing and know they’ve done the initial copy themselves.

It’d be even better for users using cloud-based storage, where moves are inexpensive but copies cause a full download and re-upload of each imported file. The only automated alternative for these users is to run a seperate job that waits/polls until the files appear locally and issues DownloadedEpisodeScan API calls to move with the right torrent hash and folder paths.

I am currently using Seedsync for this. https://github.com/ipsingh06/seedsync

My torrent client upon completion of the download, creates a hardlink on my seedbox /downloads/complete/
Seedsync watches the /downloads/complete directory and auto downloads and extracts everything on that directory locally to my NAS in /downloads/seedsync/
I have remove path mapping setup in Sonarr and it picks up individual episodes with no issues.

TV Packs are still an issue since sonnar only see's the one entry in the download client, so I usually have to import manually.

I am currently using Seedsync for this. https://github.com/ipsingh06/seedsync

My torrent client upon completion of the download, creates a hardlink on my seedbox /downloads/complete/
Seedsync watches the /downloads/complete directory and auto downloads and extracts everything on that directory locally to my NAS in /downloads/seedsync/
I have remove path mapping setup in Sonarr and it picks up individual episodes with no issues.

TV Packs are still an issue since sonnar only see's the one entry in the download client, so I usually have to import manually.

If I'm not mistaken, this scenario isn't fully supported with Sonarr. If Sonarr is watching that local folder on your NAS (/downloads/seedsync) and there is a partial file there still being sync'd from your remote server, it can cause issues since it will try importing incomplete files. It may be that you are just not encountering the issue because your sync is fast enough, but the chance is there since people could have slower connections or a sonarr check just happens to occur right at the start of a file being transfered.

From the forums:

Exposing a “Force Move” advanced option would help many torrent users who do their own post-download processing and know they’ve done the initial copy themselves.
It’d be even better for users using cloud-based storage, where moves are inexpensive but copies cause a full download and re-upload of each imported file. The only automated alternative for these users is to run a seperate job that waits/polls until the files appear locally and issues DownloadedEpisodeScan API calls to move with the right torrent hash and folder paths.

This would be a solution for me as well. After my post processing of downloads, files are copied to a folder where Sonarr will pick them up (using "Sync to another folder then move the files after the sync completes") option. However, on my Synology NAS USB share, the exposed root share "/usbshare1" for some reason differs from the system root share "/usbshare".
Hardlinks, mounts and other file system calls can only be performed on the system share "/usbshare", which is not exposed to Sonarr. Thus, Sonarr is forced to do a real copy of all files when importing them. A pure move option would be very helpful here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus101 picture markus101  Â·  4Comments

Taloth picture Taloth  Â·  4Comments

mommalongnips picture mommalongnips  Â·  3Comments

cjamesdesigner picture cjamesdesigner  Â·  3Comments

sam3d picture sam3d  Â·  3Comments