I modify gbpvr.db3 directly using SQL in a pair of batch files:
Originally Posted by fausto
The first is:
This is called by another bat file that lists all the channels I want mapped and the tuning data from scan-4.cache. Here are a few sample lines (the main file has over 250):
:This is _set_tune4.bat and is called by _set4.bat file. It sets the tuning data for a source channel number
:You can use this directly by:
: _set_tune4.bat "SOURCE_CHANNEL_NUMBER" "T:13274 etc. tuning data from scan4.cache file"
:the SOURCE_CHANNEL_NUMBER is the pid (usually)
:Always put parameters in quotes.
:It matches on the channel number for source id 4
Echo UPDATE SOURCE_CHANNEL_MAPPING > _sqlscript.scr
Echo SET enabled="Y",tuning_request=%2 >> _sqlscript.scr
Echo WHERE capture_source_oid="4" and source_channel_number=%1; >> _sqlscript.scr
SQLITE3 gbpvr.db3 < _sqlscript.scr
I use UltraEdit to convert the scan.cache file into the second bat file. A macro grabs the PID from the tuning data (it's after "P:") and constructs each line in the second bat file. The whole process takes 5 minutes or so after scanning is finished. Make sure you spend lots of time getting familiar with the structure of GBPR.db3 (I used SQL Browser Lite) , and make lots of backups. You can screw things up badly doing this sort of thing.
:This is _set4.bat
call _set_tune4.bat "104" "T:12370,V,20000,78~NID:4100~ONID:4100~TSID:11~P:104~V:7458~A:7459~L:eng~PMT:33~E:T~PCR:7458~N:>Unknown1"
call _set_tune4.bat "123" "T:12370,V,20000,78~NID:4100~ONID:4100~TSID:11~P:123~V:7458~A:7459~L:eng~PMT:33~E:T~PCR:7458~N:>Unknown2"
call _set_tune4.bat "137" "T:12370,V,20000,78~NID:4100~ONID:4100~TSID:11~P:137~V:6178~A:6179~L:eng~PMT:33~E:T~PCR:6178~N:>Unknown3"
call _set_tune4.bat "210" "T:12370,V,20000,78~NID:4100~ONID:4100~TSID:11~P:210~V:4898~A:4899~L:eng~PMT:33~E:T~PCR:4898~N:>Unknown4"
call _set_tune4.bat "212" "T:12370,V,20000,78~NID:4100~ONID:4100~TSID:11~P:212~V:5410~A:5411~L:eng~PMT:33~E:T~PCR:5410~N:>Unknown5"