

To get around this the idea is that you disable Completed Download Handling and setup delugePostProcess.py to execute from deluge when the download is done.
#Free mkv converter shows queued mp4
The problem with this is that Sonarr notices immediately and grabs the original unprocessed file, which obviously isn't ideal if you want to convert the file to an mp4 before Sonarr does its thing. With the completed download handling turned on, Sonarr automatically communicates with Deluge (or the other downloaders) and notices on its own when the download has finished and starts its process.

Sonarr essentially needs to know when the downloads are finished so it can take the download, move it, and rename it.

Post_processor = PostProcessor(output_files, log) Output_files = converter.replicate(output) Tagmp4.writeTags(output, settings.artwork, settings.thumbnail) Tagmp4 = Tvdb_mp4(tvdb_id, season, episode, original, language=settings.taglanguage) Log.info("Tagging %s with ID %s season %s episode %s." % (inputfile, tvdb_id, season, episode)) Output = converter.process(inputfile, original=original) If MkvtoMp4(settings).validSource(inputfile): Log.debug("Season: %s episode: %s." % (season, episode)) Log.debug("Original name: %s." % original) Season = int(os.environ.get('sonarr_episodefile_seasonnumber'))Įpisode = int(os.environ.get('sonarr_episodefile_episodenumbers'))Įpisode = int(os.environ.get('sonarr_episodefile_episodenumbers').split(",")) Tvdb_id = int(os.environ.get('sonarr_series_tvdbid')) Original = os.environ.get('sonarr_episodefile_scenename') Inputfile = os.environ.get('sonarr_episodefile_path') Settings = ReadSettings(os.path.dirname(sys.argv), "autoProcess.ini") Log.info("Sonarr extra script post processing started.") Log = logging.getLogger("SonarrPostConversion") 18:29:26 - autoprocess.sonarr - DEBUG - Sonarr protocol: 18:29:26 - autoprocess.sonarr - DEBUG - URL ' with payload ') 18:29:26 - autoprocess.sonarr - DEBUG - Sonarr apikey: KEY 18:29:26 - autoprocess.sonarr - DEBUG - Sonarr port: 8989. 18:29:26 - autoprocess.sonarr - DEBUG - Sonarr host: localhost. 18:29:26 - autoprocess.sonarr - INFO - Sonarr notifier started. 18:29:26 - delugePostProcess - INFO - Passing /home/plex/deluge/complete/temp_dir directory to Sonarr.
