Drone Factory is Deprecated [unrar]

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.

Okay, got it.

I’ll check it out.

Really do appreciate you taking the time.

I am a recent convert to CDH. I cannot believe I had missed it for so long. Once you realize that you let Sonarr run the show, you are much better off. I was wasting time trying to get VideoSort to work within nzbget. BOOM Sonarr does it all and even places content in different directories, such as tv and kids_tv.

I cannot think of any circumstance in which I wouldn’t always use Sonarr to get TV shows and Radarr to get movies. Why mess with any other way than pure CDH?

My caddy easily facilitates remote access with its reverse proxy skills. No need to use NZB360 nor unity. I just use Sonarr and Radarr for eveything.

It works perfectly for usenet since both sab & nzbget have excellent post-processing scripting support. But for torrents it’s a bit more complicated, due to limitations in a lot of the download clients.

Please dont take Drone Factory away! My current setup with it is perfect and requires no interaction.

1 Like

It’s gonna happen, that’s absolutely beyond discussion, so deal with it. Use the alternatives.

3 posts were split to a new topic: Import not working without Drone Factory

So, I get that Drone Factory needs to be removed. I won’t argue that point. I am curious, though is there a way to call the API through a batch file (currently have one written that extracts RARed files and moves them (or copies files if they are not compressed), then converts them to MP4, then Moves them to a specific folder. It would be great if I could just add a few lines to invoke the API, but if this is not possible, I can convert to PowerShell. Would just be easier if I didn’t have to rewrite the whole thing.


On a side note. It would just make things so much easier, if you could select the folder for Sonarr to search, in lieu of the folder where the downloads go initially. If this sounds like (or is basically exactly like, lol) Drone Factory, then forget what I just said. :slight_smile:

I guess I just wanted to say I’ve really enjoyed using sonarr (and radarr) since I got it a couple months ago. I only use torrents and all the private trackers I’m apart of do use .rar for most tv and movies. The deluge extractor has been broken for a long time and only works sometimes and even if it did work I guess it wouldn’t delete the unrard file after being copied by sonarr. I’m on Windows 10 and I’ve spent around 8 hours straight for the last two nights trying to automate the unrar process and also would like the unrard video file to be deleted after being copied by sonarr and haven’t been able to do it. I don’t really know how to code n write scripts and things that advanced. I mean I can run sonarr radarr jackett with deluge n plex n share with my friends so I’m not like retarded.

I just wish there was a nice option inside sonarr (and radarr) where I just enable unrar and it unrars and deletes the extra video file. I just don’t think it should be this hard and it seems like it’s easier for you guys to do something than the torrent clients unraring and some how deleting the extra file after its copied.

Anyways I’ve given up for now unless I can get seanvree’s method working sometime and then I’ll be screwed once the drone factory is gone I guess? Unless somebody can point me to step by step instructions for somebody on windows 10 to create and run these scripts because I haven’t found any guides that will unrar and delete the extra video file other than seanvree’s.

Plz add support in sonnar to unrar and delete the extra video file after being copied to sonarr.

1 Like

You’d just need something that can make the call to the API, such as curl or even have the batch file call powershell to make the call.

That’s off topic for this thead, but covered by

Well it’s not exactly off topic seeing as that is why I’m using a drone folder…

In that case no, but that wasn’t clear (to me at least), but regardless, it’s on our radar, thought nothing planned on when it will be worked on.

Yea sorry it’s kinda of rambley and not clear I’m running on 4 hours of sleep in the last 2 days. Thanks for you time <3

edit: kinda of… see what i mean lol

1 Like

Another user who relies on Drone Factory here but I won’t complain, just here to figure out how to work without it. Is there an example of how to call the API to trigger the DownloadedEpisodeScan?

In my setup, files are scp’d to a folder on my windows computer running Sonarr. I don’t have a download client running that can trigger anything, but I can use EventGhost to watch the directory and then do something… Does Sonarr happen to have an EventGhost plugin?

Here’s someone who had the same but then with BTSync: https://github.com/Sonarr/Sonarr/issues/2021

But I’d like to know a bit more about your setup, if there’s no download client then how’s Sonarr triggering downloads?

I haven’t heard about EventGhost before today, so I don’t know how it works exactly. I hope it doesn’t have the same disk scanning pitfalls that the Drone Factory has, otherwise it’s not an improvement.

This is why i use Drone Factory. I’d like to hear if there is another solution (other than the obvious one to let Sonarr deal with subtitles)

On my NAS I have two sonar instances running (one in docker) The first downloads everything and stores it in a generic directory. From there on I use an autosub program that finds subtitles. Sometimes the same day sometimes it takes longer.
Next there is a perl program that moves the episodes that have a subtitle to… the drone factory folder that the second instance of Sonarr scans periodically.
The second Sonarr therefore only caters for the correct placement.
As this process takes care of creating the correct folder, setting up jpg’s it would be a heck of a task to program this myself in perl.

As I use iFlicks to convert my video files, I was using the Drone Folder as the final destination for converted files. I can completely understand why the feature shouldn’t be used but in my scenario I need it. Ive got the DownloadEpisodesScan API working, so Iflicks is now triggering this. Works great.

My only issue now is that because I have “Complete Download Handling” off and no drone factory set, I’m getting the following health check warning “Enable Completed Download Handling or configure Drone factory”

Is there a way to switch this off??

@DekkersBloemen Use the API call to signal Sonarr to import it. Alternatively you could look into Custom Scripts, which can be triggered after Sonarr has imported it. You’ll have to find a way to deal with those ‘deferred’ ones, of course.

@dhcrees Which download client? Coz if you use sabznbd/nzbget then you can simply do the transcoding as pp-script. nzbToMedia for example does that, and completely compatible with Completed Download Handling, from Sonarr’s perspective it simply hasn’t finished downloading yet.

@Taloth can you recommend a SAB script to do the transcoding, I basically want all downloads converted into M4V. I looked at this before and didn’t have much luck with it, thats why I went down the iflicks route. Quickly looking at nzbToMedia it doesn’t appear to do transcoding, just renaming etc (but I might have missed something). Many thanks for your help.

@dhcrees nzbToMedia does it using ffprobe and ffmpeg. https://github.com/clinton-hall/nzbToMedia/wiki#transcoding-and-video-corruption-checks although what you likely need is a remux of the video and optional transcode for the audio. I’m assuming you want m4v because of apple devices.
There are other pp-scripts afaik that do the same.

Alternative is plex, which does remuxing/transcoding on the fly.