2008-02-10, 09:58 PM
I've made a C# exe that can be run at the DOS prompt to insert recordings into the RECORDING_SCHEDULE table by supplying arguments to it ( download link and syntax at bottom of this post )
My problem is that these RECORDING_SCHEDULE rows are only picked up and acted on by the recording service unless either:
a) I stop and restart the service after running my exe ( unsatisfactoy since it may break a recording in progress )
or
b) Any schedules that my exe inserts that are scheduled to follow recordings scheduled via the usual PVR2 GUI *are* picked up after a "GBPVR GUI-inserted" recording starts.
When first proposing this exe, sub suggested I needed to run "PVRX2.exe -OnlyUpdateEPG" after inserting a row, but doing this does not fix the problems described above.
Please, please, please, is it possible that PVRX2.exe could be given a new command line option to force it to re-look at the RECORDING_SCHEDULE table and take notice of any new *externally* inserted rows ?
This would make my exe useful for any number of other apps to be able to integrate with GBPVR i.e. other EPG services, or remote SMS schedulers.
-----
Here is a link to my exe:
http://cid-440b69d95a3b292f.skydrive.liv...cgbpvr.exe
It is called recgbpvr.
A copy of the newest System.Data.SQLite.dll must be in the folder you run it from. Download that from here:
http://cid-440b69d95a3b292f.skydrive.liv...SQLite.dll
The syntax is:
Where:
<path to gbpvr db> = the fullpath to where you have installed the gbpvr.db3 file e.g. "c:\program files\devnz\gbpvr\gbpvr.db3"
<prepad mins> = number of pre-padding minutes for this recording e.g. 2
<endpad mins> = number of post-padding minutes for this recording e.g. 10
<channel number> = the number you have assigned the channel you want to record e.g. 4
<programme starttime> = start time of recording in format "YYYY-MM-DD HH:MI" e.g. "2008-02-11 21:30" ( for 9:30pm on Feb 11th 2008 )
All the above arguments are mandatory, the next two are optional and if left out the exe will query the GBPVR EPG data and get the end time and programme name automatically.
[programme endtime] = end time of recording, in the same format as the start time
[recording filename] = The name you want GBPVR to give the recording file e.g. "Manual Recording 3"
If you do specify an endtime and recording filename, the recording event will be entered as a GBPVR "manual recording" , rather than a named programme recording.
-----
Errors:
The exe does not check for typos in arguments, so will crash if given invalid input.
You may see the following errors reported:
This means you specified a channel number and start time and expected GBPVR to find the end time and programme name automatically but it could not find EPG data for that channel at that time. You could force a manual recording for the same channel and start time by running the recgbpvr.exe again and adding the end time and recording filename arguments
You probably mistyped the channel number!
All your recording sources that carry the channel you want to record are busy at the time you requested
My problem is that these RECORDING_SCHEDULE rows are only picked up and acted on by the recording service unless either:
a) I stop and restart the service after running my exe ( unsatisfactoy since it may break a recording in progress )
or
b) Any schedules that my exe inserts that are scheduled to follow recordings scheduled via the usual PVR2 GUI *are* picked up after a "GBPVR GUI-inserted" recording starts.
When first proposing this exe, sub suggested I needed to run "PVRX2.exe -OnlyUpdateEPG" after inserting a row, but doing this does not fix the problems described above.
Please, please, please, is it possible that PVRX2.exe could be given a new command line option to force it to re-look at the RECORDING_SCHEDULE table and take notice of any new *externally* inserted rows ?
This would make my exe useful for any number of other apps to be able to integrate with GBPVR i.e. other EPG services, or remote SMS schedulers.
-----
Here is a link to my exe:
http://cid-440b69d95a3b292f.skydrive.liv...cgbpvr.exe
It is called recgbpvr.
A copy of the newest System.Data.SQLite.dll must be in the folder you run it from. Download that from here:
http://cid-440b69d95a3b292f.skydrive.liv...SQLite.dll
The syntax is:
Quote:recgbpvr <path to gbpvr db> <prepad mins> <endpad mins> <channel number> <programme starttime> [programme endtime] [recording filename]
Where:
<path to gbpvr db> = the fullpath to where you have installed the gbpvr.db3 file e.g. "c:\program files\devnz\gbpvr\gbpvr.db3"
<prepad mins> = number of pre-padding minutes for this recording e.g. 2
<endpad mins> = number of post-padding minutes for this recording e.g. 10
<channel number> = the number you have assigned the channel you want to record e.g. 4
<programme starttime> = start time of recording in format "YYYY-MM-DD HH:MI" e.g. "2008-02-11 21:30" ( for 9:30pm on Feb 11th 2008 )
All the above arguments are mandatory, the next two are optional and if left out the exe will query the GBPVR EPG data and get the end time and programme name automatically.
[programme endtime] = end time of recording, in the same format as the start time
[recording filename] = The name you want GBPVR to give the recording file e.g. "Manual Recording 3"
If you do specify an endtime and recording filename, the recording event will be entered as a GBPVR "manual recording" , rather than a named programme recording.
-----
Errors:
The exe does not check for typos in arguments, so will crash if given invalid input.
You may see the following errors reported:
Quote:ERROR: Non-manual recording requested, but GBPVR could not find a programme in it's EPG data at that time for the requested channel - try again, but specify an end time and a recording filename to set a manual recording
This means you specified a channel number and start time and expected GBPVR to find the end time and programme name automatically but it could not find EPG data for that channel at that time. You could force a manual recording for the same channel and start time by running the recgbpvr.exe again and adding the end time and recording filename arguments
Quote:ERROR: GBPVR has not been set up for that channel - recording not scheduled
You probably mistyped the channel number!
Quote:ERROR: No free recording source available at that time for that channel - recording not scheduled
All your recording sources that carry the channel you want to record are busy at the time you requested