The ‘unrar’ thing isn’t specific to Windows, and it doesn’t need the Drone Factory. I suspect that the fact that you happen to be using Windows heavily skews your perception of the problem. ‘Windows’ is utterly irrelevant in this discussion and I very much prefer we move beyond that.
It will definitely post-process them. It allows you to tell Sonarr “I’ve got a temporary directory here, please import.”. So in that sense the DownloadedEpisodesScan is the Drone Factory, just without the periodic scan.
The difference is that you can tell it which directory, how to import (move vs copy) and which Download it was for (hash), and most importantly when to import. That way you can ensure Sonarr doesn’t try import files that are still being downloaded, unrarred, transcoded, etc.
If the infohash is specified it also allows Sonarr to understand which download (Completed Download Handling) the import is for and will automatically consider it ‘imported’.
This is what I meant with ‘event-driven’ since it allows an external process tell Sonarr that downloading finished, and that it should now import.
So your process should be:
- have torrent client invoke your script
- Script should unrar to a new temporary directory, preferably named by the torrent name.
- Script should then invoke the Sonarr API, path=temporary directory, importMode=Move, and optionally downloadClientId=Infohash.
- Sonarr will asynchroneously scan the specified path, parse the file/folder name, and attempt to import the result into the series folder (renaming the files if renaming is enabled)
- Optionally Sonarr will also mark the grabbed release as ‘imported’ if the Infohash is specified.
The same process should be followed for any kind of ‘pre-processing’ such as transcoding.
PS: The command that scans the series folder is the RescanSeries
command, which takes an optional series ID. But you don’t need that one.