home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
Hauppauge HD-PVR & Colossus Support
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 751687" data-attributes="member: 82144"><p>Fantastic, and you're most welcome! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p><p>(Just to be clear: although you can see the guide data you can't actually control the STB yet, so recording would potentially record the wrong channel. Fixing that requires setting up the blaster, which is the bit I can't help with...)</p><p></p><p></p><p>Well if you know MySQL then it might not be very hard after all! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p>To answer your question: yes, it will either be MySQL or SQL Server, depending on what DB you chose when you installed TV Server. The syntax should be quite similar. Unfortunately I'm at work at the moment so I don't have access to a DB schema to tell you *exactly* what statements you'd require. Having said that I can give you some tips:</p><p></p><p>- the two tables you'll be interested in are "Channel" and "TuningDetail"</p><p>- each Channel record is associated with one or more TuningDetail records through a channelId foreign key column in the TuningDetail table</p><p>- for the Colossus (or HDPVR) it would be a one to one mapping - one tuning detail per channel</p><p>- each TuningDetail record will be exactly the same apart from the channelId foreign key reference, the channel number (lcn I *think*) and the primary key (id)</p><p>- the Channels records will be very similar too - the only differences *might* be the id and name</p><p></p><p>If you're okay with PHP then it should be possible to create a loop over a list of cable channel names and numbers that inserts one tuning detail and one channel for each cable channel. You may even be able to parse the XMLTV file to get channel names and numbers out. It might be a little tricky to get the foreign keys right, but you could potentially use a loop variable for the channel id which would make things simpler. Pseudo-code (sorry, I only know Perl, and please forgive the channel examples <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />):</p><p></p><p>[CODE]my @cableChannels = (['CBS', 1], ['NBC', 2]);</p><p>my $i = 0;</p><p>foreach my $channel (@cableChannels) {</p><p>insertChannel($i, $channel);</p><p>insertTuningDetail($i);</p><p>}</p><p></p><p>sub insertChannel {</p><p>// execute SQL to insert a channel record with a given id, name and number</p><p>}</p><p>sub insertTuningDetail {</p><p>// execute SQL to insert a tuning detail linked to a channel with the given id</p><p>}[/CODE]</p><p></p><p>[Edit: You could also add code for mapping the channels to the Colossus, but to be honest it is easier to that in TV Server configuration with one click. As far as mapping the XMLTV channels to MP channels goes: if you use the exact names from the XMLTV file when you create the channel records then the plugin will be smart enough to guess the correct mappings. You can always tweak the MP channel names after the mapping is set up if you don't like the XMLTV guide names...]</p></blockquote><p></p>
[QUOTE="mm1352000, post: 751687, member: 82144"] Fantastic, and you're most welcome! :D (Just to be clear: although you can see the guide data you can't actually control the STB yet, so recording would potentially record the wrong channel. Fixing that requires setting up the blaster, which is the bit I can't help with...) Well if you know MySQL then it might not be very hard after all! :D ;) To answer your question: yes, it will either be MySQL or SQL Server, depending on what DB you chose when you installed TV Server. The syntax should be quite similar. Unfortunately I'm at work at the moment so I don't have access to a DB schema to tell you *exactly* what statements you'd require. Having said that I can give you some tips: - the two tables you'll be interested in are "Channel" and "TuningDetail" - each Channel record is associated with one or more TuningDetail records through a channelId foreign key column in the TuningDetail table - for the Colossus (or HDPVR) it would be a one to one mapping - one tuning detail per channel - each TuningDetail record will be exactly the same apart from the channelId foreign key reference, the channel number (lcn I *think*) and the primary key (id) - the Channels records will be very similar too - the only differences *might* be the id and name If you're okay with PHP then it should be possible to create a loop over a list of cable channel names and numbers that inserts one tuning detail and one channel for each cable channel. You may even be able to parse the XMLTV file to get channel names and numbers out. It might be a little tricky to get the foreign keys right, but you could potentially use a loop variable for the channel id which would make things simpler. Pseudo-code (sorry, I only know Perl, and please forgive the channel examples ;)): [CODE]my @cableChannels = (['CBS', 1], ['NBC', 2]); my $i = 0; foreach my $channel (@cableChannels) { insertChannel($i, $channel); insertTuningDetail($i); } sub insertChannel { // execute SQL to insert a channel record with a given id, name and number } sub insertTuningDetail { // execute SQL to insert a tuning detail linked to a channel with the given id }[/CODE] [Edit: You could also add code for mapping the channels to the Colossus, but to be honest it is easier to that in TV Server configuration with one click. As far as mapping the XMLTV channels to MP channels goes: if you use the exact names from the XMLTV file when you create the channel records then the plugin will be smart enough to guess the correct mappings. You can always tweak the MP channel names after the mapping is set up if you don't like the XMLTV guide names...] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
Hauppauge HD-PVR & Colossus Support
Contact us
RSS
Top
Bottom