I've hosted a zip file of the batch files I use in my NextPVR installation on my website here. Hopefully they will be useful to someone either to steal bits of code from or to use in full. If you want to use one or more of them, feel free. Just please read them first to make sure they do what you want. If you find them useful clicking on an ad on my site or using the site search will get me a fraction of a cent from Google!
Most of these should be extracted into the Next PVR scripts folder which varies between operating systems, but in WIndows XP (32 bit) is "C:\Documents and Settings\All Users\Application Data\NPVR\Scripts". The two in the folder "Put _These_In_Your_Recordings_Folder_Root" should be obvious where to put! :-
Start_check_InProgress.bat*- this is run by the task scheduler at about 22:00 each night. It runs check_InProgress.bat
check_InProgress.bat*- this checks to make sure that there are no recordings being made and that handbrake is not running, then it shuts down
StartupUpdateEPG.bat*- this runs every time my computer is turned of and updates the EPG
UpdateEPG.bat*- this is run by NextPVR before it updats the EPG and it runs XMLTV_console to update the XML file
UPDATED: RenameRecording.bat*- this is run by PostProcessing.bat and is used to rename recordings based on the NextPVR database and update the database to point to the new file if they have a title & a subtitle. If they don't, it leaves them alone.
UPDATED: PostProcessing.bat*- after a recording has been made, NextPVR runs this. It makes sure handbrake is not running and encodes the ts file to an mp4. It also deletes the original ts file if the encode worked. It then runs the automatic RenameRecordings.bat.
NEW: ManualRenameRecording.bat - I'm really pleased with this. Click here for full details.
NEW: ProcessAll.bat - This searches for all ts files within the folder (and subfolders) it is in and runs the PostProcessing.bat on them. I have it run at startup to catch any encodes missed out.
NEW: Start_Process_All.bat - this just waits for 60 seconds and then runs ProcessAll with low priority & hidden etc. I put a shortcut to this file into my startup folder.
NEW: restart_service.bat - I was finding that somethimes NextPVR would get in a loop or crash & the computer wouldn't turn off as it should or record new programs. All this does is stop & start the recording service. I use a scheduled task to run it at 4am every day. I don't record stuff at this time and the computer should be off by now anyway
You will also need the NScripthelper.exe file in your "C:\Program files\NextPVR\" folder. It's also on my site as well as elsewhere on this forum. Sub gave it to me and saved me hours of messing around with VB script. You can see his listing of the commands here. So thanks yet again to Sub, awesome dev!
You will also need to download PSTools if you want to be able to shutdown your computer as I do and tell the batch file where you extracted them to. I also use PRCView to check if Handbrake is running and you would need to download this and extract somewhere if you want the batch file to work.
Any questions feel free to post here...
Hopefully they are bug free now, but if not please let me know!
Most of these should be extracted into the Next PVR scripts folder which varies between operating systems, but in WIndows XP (32 bit) is "C:\Documents and Settings\All Users\Application Data\NPVR\Scripts". The two in the folder "Put _These_In_Your_Recordings_Folder_Root" should be obvious where to put! :-
Start_check_InProgress.bat*- this is run by the task scheduler at about 22:00 each night. It runs check_InProgress.bat
check_InProgress.bat*- this checks to make sure that there are no recordings being made and that handbrake is not running, then it shuts down
StartupUpdateEPG.bat*- this runs every time my computer is turned of and updates the EPG
UpdateEPG.bat*- this is run by NextPVR before it updats the EPG and it runs XMLTV_console to update the XML file
UPDATED: RenameRecording.bat*- this is run by PostProcessing.bat and is used to rename recordings based on the NextPVR database and update the database to point to the new file if they have a title & a subtitle. If they don't, it leaves them alone.
UPDATED: PostProcessing.bat*- after a recording has been made, NextPVR runs this. It makes sure handbrake is not running and encodes the ts file to an mp4. It also deletes the original ts file if the encode worked. It then runs the automatic RenameRecordings.bat.
NEW: ManualRenameRecording.bat - I'm really pleased with this. Click here for full details.
NEW: ProcessAll.bat - This searches for all ts files within the folder (and subfolders) it is in and runs the PostProcessing.bat on them. I have it run at startup to catch any encodes missed out.
NEW: Start_Process_All.bat - this just waits for 60 seconds and then runs ProcessAll with low priority & hidden etc. I put a shortcut to this file into my startup folder.
NEW: restart_service.bat - I was finding that somethimes NextPVR would get in a loop or crash & the computer wouldn't turn off as it should or record new programs. All this does is stop & start the recording service. I use a scheduled task to run it at 4am every day. I don't record stuff at this time and the computer should be off by now anyway
You will also need the NScripthelper.exe file in your "C:\Program files\NextPVR\" folder. It's also on my site as well as elsewhere on this forum. Sub gave it to me and saved me hours of messing around with VB script. You can see his listing of the commands here. So thanks yet again to Sub, awesome dev!
You will also need to download PSTools if you want to be able to shutdown your computer as I do and tell the batch file where you extracted them to. I also use PRCView to check if Handbrake is running and you would need to download this and extract somewhere if you want the batch file to work.
Any questions feel free to post here...
Hopefully they are bug free now, but if not please let me know!