Scripts - sub3/NextPVR GitHub Wiki
NextPVR will call certain scripts if they exist, to allow the user plugin their own custom handling of certain events. On Windows these scripts are created as batch files (.bat), in the C:\Users\Public\NPVR-data\scripts directory. On Linux, when NextPVR has been installed using the deb installer, these scripts are created as shell scripts (.sh), in the var/opt/nextpvr/scripts directory.
Category | Script | Event |
---|---|---|
Service Hooks | PreStartup | Called at startup before the recording service is started |
PostStartup | Called after the recording service has started | |
PreShutdown | Called prior to shutting down the recording service | |
Archive Hooks | PreArchive | Called prior to archiving (moving) a file to another volume |
PostArchive | Called after archiving (moving) a file to another volume | |
Recording Hooks | ParallelProcessing | Called when a recording is started |
PostProcessing | Called when a recording is completed | |
PostCancel | Called when a recording is cancelled | |
EPG Hooks | UpdateEPG | Called prior to processing the EPG |
PostLoadEPG | Called after the EPG has been loaded, but before recurring recordings have been processed | |
PostUpdateEPG | Called after the EPG update has been completed |
When these script files are run, NextPVR will capture the output and send it to the NextPVR logs, to help you diagnose any problems with your scripts.
Some of these scripts are passed parameters. The table below details the parameters for those scripts.
Script | Parameters |
---|---|
ParallelProcessing PostProcessing PostCancel |
|
PreArchive PostArchive |
|
These Windows cmd scripts provide a template for leveraging the hooks NPVR has for custom processing. The README.txt in the zip file provides a description of each script and instructions on how to incorporate into your NextPVR setup.