Hi,
I’m running Win 7 with the deveop branch of Sonarr.
I’m having a issue getting the custom script notification working. I’m trying to get it to call Sickbeard_MP4_converter when the episode file changes.
Heres the error I’m getting no matter what I do:
[code]Details
Message
Unable to send OnRename notification to: Post Conversion and tagging: The specified executable is not a valid application for this OS platform.
Exception
System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at NzbDrone.Common.Processes.ProcessProvider.Start(String path, String args, StringDictionary environmentVariables, Action1 onOutputDataReceived, Action
1 onErrorDataReceived) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Processes\ProcessProvider.cs:line 167
at NzbDrone.Common.Processes.ProcessProvider.StartAndCapture(String path, String args, StringDictionary environmentVariables) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Processes\ProcessProvider.cs:line 199
at NzbDrone.Core.Notifications.CustomScript.CustomScriptService.ExecuteScript(StringDictionary environmentVariables, CustomScriptSettings settings) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Notifications\CustomScript\CustomScriptService.cs:line 86
at NzbDrone.Core.Notifications.CustomScript.CustomScriptService.OnRename(Series series, CustomScriptSettings settings) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Notifications\CustomScript\CustomScriptService.cs:line 69
at NzbDrone.Core.Notifications.CustomScript.CustomScript.OnRename(Series series) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Notifications\CustomScript\CustomScript.cs:line 32
at NzbDrone.Core.Notifications.NotificationService.Handle(SeriesRenamedEvent message) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Notifications\NotificationService.cs:line 149[/code]
this is the Custom Script settings in Sonarr:
and this is the current Sample script I’m trying to use:
[code]#!/usr/bin/env php
<?php // Do some echoing, why? why not.. echo "Starting the Sonarr.php postprocessing script\n"; // for some reason, environment variables from the cli is hiding in $_SERVER, don't ask me, php is silly sometimes $envVars = $_SERVER; // All the env variables attached to variables $title = isset($envVars["sonarr_series_title"]) ? $envVars["sonarr_series_title"] : null; // Not Safe for Work (2015) $filePath = isset($envVars["sonarr_episodefile_path"]) ? $envVars["sonarr_episodefile_path"] : null; // /storage/TV Shows/Not Safe for Work (2015)/Season 1/Not Safe for Work (2015) - S01E01 - Episode 1.mkv $sceneName = isset($envVars["sonarr_episodefile_scenename"]) ? $envVars["sonarr_episodefile_scenename"] : null; // "Not.Safe.For.Work.UK.S01E01.720p.HDTV.x264-TLA $airDate = isset($envVars["sonarr_episodefile_episodeairdatesutc"]) ? $envVars["sonarr_episodefile_episodeairdatesutc"] : null; // 6/30/2015 8:00:00 PM $seasonNumber = isset($envVars["sonarr_episodefile_seasonnumber"]) ? $envVars["sonarr_episodefile_seasonnumber"] : null; // 1 $relativePath = isset($envVars["sonarr_episodefile_relativepath"]) ? $envVars["sonarr_episodefile_relativepath"] : null; // Season 1/Not Safe for Work (2015) - S01E01 - Episode 1.mkv $eventType = isset($envVars["sonarr_eventtype"]) ? $envVars["sonarr_eventtype"] : null; // Download $episodeAirDates = isset($envVars["sonarr_episodefile_episodeairdates"]) ? $envVars["sonarr_episodefile_episodeairdates"] : null; // 2015-06-30 $seriesID = isset($envVars["sonarr_series_id"]) ? $envVars["sonarr_series_id"] : null; // 339 $seriesPath = isset($envVars["sonarr_series_path"]) ? $envVars["sonarr_series_path"] : null; // /storage/TV Shows/Not Safe for Work (2015) $tvdbID = isset($envVars["sonarr_series_tvdbid"]) ? $envVars["sonarr_series_tvdbid"] : null; // 297084 $episodeNumbers = isset($envVars["sonarr_episodefile_episodenumbers"]) ? $envVars["sonarr_episodefile_episodenumbers"] : null; // 1 $fileID = isset($envVars["sonarr_episodefile_id"]) ? $envVars["sonarr_episodefile_id"] : null; // 27224 $releaseGroup = isset($envVars["sonarr_episodefile_releasegroup"]) ? $envVars["sonarr_episodefile_releasegroup"] : null; // tla $quality = isset($envVars["sonarr_episodefile_quality"]) ? $envVars["sonarr_episodefile_quality"] : null; // HDTV-720p $qualityVersion = isset($envVars["sonarr_episodefile_qualityversion"]) ? $envVars["sonarr_episodefile_qualityversion"] : null; // 1 // If the event isn't download, just die here // if($eventType != "Download") // die(); // Make sure the filepath is set if($filePath != null) { // make sure the file path is actually real if(file_exists($filePath)) { // Dump some stuff into the log file_put_contents("C:\Scripts\convert.log", "Converting {$filePath}", FILE_APPEND); // Now execute the sickbeard mp4 converter so we can convert the file to an mp4 with the settings we've set exec('C:\Python27\python C:\Scripts\manual.py -a -i "'.$filePath.'"'); } }[/code]