It would seem that a lot of issues people have with various integration challenges (extraction, subtitles, etc) would have a much more flexible and powerful approach if we could perform an operation on the files AFTER they were downloaded from the client, but BEFORE they are imported into Sonarr.
Right now Sonarr supports the following connection events:
- On Grab
- On Download (which is really “on import” I believe)
- On Upgrade
- On Rename (which I don’t believe takes effect on initial rename at import time)
I propose (at least):
- On Grab
- On Download (which is when Sonarr sees the client as “completed”).
- On Import (which is the current “on download”)
- On Upgrade
- On Rename
Along with a few more environmental variables for the new (and some existing) events it would seem that we would have much greater flexibility.
The “on download” option would have to have the option to suspend import until the custom script completes processing. Then, we would be able to do whatever manipulation is necessary to the client files before Sonarr attempts the import.
Adding to this, if the script was able to return values back up to Sonarr it would be possible to change how the import occurs (directory to import from, move/copy/link, etc.).