1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-03 05:35:29 +00:00

Updated Custom Post Processing Scripts (markdown)

Mark McDowall 2017-06-16 11:29:16 -07:00
parent a4b07354cd
commit c7f5643c16

@ -2,7 +2,7 @@ If you're looking to trigger a custom script in your download client to tell Son
### Overview ###
Sonarr can execute a custom script when new episodes are imported or a series is renamed, depending on the which action occurred the parameters will be different. Parameters are passed to the script through environment variables (allowing for more flexibility in what we send to the script and not having to worry about a particular order). In all cases the Environment Variables Sonarr sends will be prefixed with `Sonarr` and converted to lowercase, the `Series_Id` will appear as `sonarr_series_id`.
Sonarr can execute a custom script when new episodes are imported or a series is renamed, depending on the which action occurred the parameters will be different. Parameters are passed to the script through environment variables (allowing for more flexibility in what we send to the script and not having to worry about a particular order). In all cases the Environment Variables Sonarr sends will be prefixed with `Sonarr_` and converted to lowercase, the `Series_Id` environment variable will appear as `sonarr_series_id`.
### Environment Variables ###
@ -71,6 +71,10 @@ Sonarr can execute a custom script when new episodes are imported or a series is
| Series_Path | Full path to the series |
| Series_TvdbId | TVDB ID for the series |
### Arguments ###
Additional command line line arguments that are passed to your script, such as running your script through cmd.exe you would set the path to `cmd.exe` and the arguments to `/c C:\Path\to\script.bat`.
### Specific usage tips ###
#### PHP ####
The information from Sonarr will not be added to $_ENV as one might expect but should be included in the [$_SERVER variable](https://secure.php.net/manual/en/reserved.variables.server.php). A sample script to use this information to convert a file can be found [here](https://gist.github.com/karbowiak/7fb38d346e368edc9d1a).