-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration.BatchFiles
NextPVR allows you to use Windows batch files to apply custom logic and perform tasks before and after certain operations.
On this page... (hide)
Batch files should be stored in the Scripts\ directory under the data directory.
Batch files are just regular text files and can be created using Notepad but saving '.bat' instead of '.txt'. As a batch file is a list of Windows/DOS commands there's a lot of help on the internet regarding authoring batch files and what they can do.
NextPVR will run (execute) these named batch files if present.
Run as soon as a recording begins. Commonly used for adding commercial skipping functionality (comskip).
Arguments:
- filename - the full path and file name of the recording file.
- channel number - the channel number it is recording from.
- oid - unique identifier to the scheduled_recordings table, applicable even if filename (%1) changes
- capture Oid - unique identifier to the device used for recording
- recording title - the title of the recording
Run as soon as a recording ends. Commonly used for adding commercial skipping functionality (comskip) or transcoding.
Arguments:
- filename - the full path and file name of the recording file.
- channelNumber - the channel number it was recorded from.
- oid - unique identifier to the scheduled_recordings table, applicable even if filename (%1) changes
- capture Oid - unique identifier to the device used for recording
- recording title - the title of the recording
Run when a recording is cancelled while recording.
Arguments:
- filename - the full path and file name of the recording file.
- channel number - the channel number it was recorded from.
- oid - unique identifier to the scheduled_recordings table, applicable even if filename (%1) changes
- capture Oid - unique identifier to the device used for recording
- recording title - the title of the recording
Run when the EPG update begins at the time specified in Settings. Commonly used to update an XMLTV file used as the EPG source. No arguments.
Run once the update EPG operation has completed. Commonly used for other nightly maintenance/update tasks and with EPG processing enhancement tools. No arguments.
Run after the PC resumes from sleep, before any recordings are started. No arguments.
Arguments:
- source file - the full path and file name of the file to be archived.
- destination file - the full path and file name where the file will be archived to.
- recording oid - unique identifier to the scheduled_recordings table
Arguments:
- source file - the full path and file name of the file to be archived.
- destination file - the full path and file name where the file will be archived to.
- recording oid - unique identifier to the scheduled_recordings table
Most of these scripts are run by the Recording Service which runs as 'Local System', not your normal desktop user. Among other things, mapped network drives will not be there. Use \\server\sharename or \\ip\sharename instead. Additionally, when a script runs the working directory is NOT what you think it is! Begin all scripts with a "cd" command to set the working directory. example cd /d c:\comskip or cd /d e:\mc2xml or even cd /d "%~dp0" if you just want to run in the scripts directory.
These are examples of batch files which perform NextPVR related tasks. Some users have also posted batch files they use on the forums.
Awaiting user submitted examples...
Page last modified on October 28, 2013, at 11:07 AM
- General
- Devices
- Channels
- Recording
- Media Folders
- Decoders
- Misc
- Misc2
- DVD
- NMT and Web
- Status
- Plugins
- EPG
- Advanced (config.xml)
Help pay the bills, and keep the project alive!
Support NextPVR by viewing this ad
© 2011 pmwiki-2.2.74 NextPVR




