MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Main Features (talk, share your ideas, get support) » Watch / Listen Media » MyTV - Engine 0.2 » Tips and Tricks


Tips and Tricks Post your Tips and Tricks in here.

Reply
 
Thread Tools Display Modes
Old 2005-10-17, 00:40   #1 (permalink)
Portal Member
 
Join Date: Sep 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts


Default Mass Updating Channels Config for External Settops

Problem: I'm a DirecTV subscriber with an old settop box. I am not using a serial controller for channels yet, and so I am using USBUIRT (an external IR transmitter). As such, I need to configure all of my MP TVGuide channels to use the external setup top box. Using the current MP configuration GUI, you must do this for each channel. However, even the basic DirecTV subscription has a few hundred channels. Also, unless you setup each channel manually (versus importing them from your XMLTVGuide.xml file), the channel sorting order will be off for various reasons that I'll blame on the Europeans for now.

Caveat: This tip/trick is not well tested, and I'm not an MP expert, but it has saved me a lot of time and seems to work. It is somewhat dependent on your own configuration and at a minimum you need to first determine the id value for your own settup tv capture/input card. My card's id in MP was 250000 for the S-Video input from my Hauppage PVR150MCE. Probably the easiest way for you to determine this id for yourself, is to use the MP configuration.exe to setup one external channel manually, and then use the SQLite Database Browser utility to examine that data for the capture card id. If you don't understand any of the SQL below, you probably shouldn't try doing this. At a minimum, shutdown MP and make a backup copy of the TVDatabaseV21.db3 file first.

Solution: The MP distribution comes with a database utility for viewing/manipulating its internal databases. (MP uses the SQLite3 database.) The utility is named "SQLite Database Browser" and is in the /docs directory. (If not there, it is easily found and downloaded from the Internet.)

The database to be modified: TVDatabaseV21.db3

Prequisites: Everything should be setup and working in MP for you except for the actual channel changing. (You should at least setup a few channels manually for your external display to make sure things are working as expected.) You should have also imported your channels from a valid XMLTVGuide.xml file. This prequisite is very important, and you should make sure that your MP TVGuide display shows the correct information (even if it doesn't change channels correctly and is in the wrong order) before continuing. MP's tvguide import process can take a while to complete and runs in the background (I think?).

Don't forget to change "250000" in the examples below to whatever is appropriate for your setup!

Example Steps:
1) Using the SQL editor in the utility, first run this SQL statement, substituting your capture card ID as appropriate. This statement takes the XMLTVGuide supplied channel number and makes it the external settop channel number.

Code:
UPDATE channel SET [ExternalChannel]=[iChannelNr] WHERE [ExternalChannel] Like 'Unknown' AND [iChannelNr]<250000;
2) This statement tells MP that all of your channel numbers are actually sourced from your TV capture card's input.

Code:
 UPDATE channel SET iChannelNr=250000 WHERE iChannelNr<250000
3) This corrects the channel sort order according to the external channel numbers. (This makes sense to the American/Australian TV users.)

Code:
UPDATE channel SET [iSort]=[ExternalChannel]
4) This simply updates the configuration flag used by MP to indicate that a given channel is from an external settop and that transmit commands should be issued appropriately.

Code:
UPDATE channel SET [bExternal]=1
That should be it. Doing the database manipulation saved me a few hours of tedious setup I think. (If I'm missing something obvious and this wasn't really necessary, PLEASE let me know. ) Otherwise, hope it helps someone.
__________________
Silverstone L013 - MSI K8N Neo4 - AMD3000+ (venice) - 1GB - 200GB SATA 7200.8 -
PVR-150MCE - Geforce 6600 -
Northbridge Zalman Heatsink - 1 too many fans - DirecTV - Non HDTV...yet
kaliatech is offline   Reply With Quote
Old 2005-11-08, 16:57   #2 (permalink)
Retired Team Member
 
mzemina's Avatar
 
Join Date: Feb 2005
Location: Ft Smith, AR
Posts: 2,045
Thanks: 35
Thanked 12 Times in 12 Posts

Country:


Default

Can't a (maybe the TV plugin screen) plugin have a button that would actually generate and submit this SQL code?

Mike
mzemina is online now   Reply With Quote
Old 2005-11-08, 21:36   #3 (permalink)
Portal Member
 
Join Date: Sep 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Quote:
Can't a (maybe the TV plugin screen) plugin have a button that would actually generate and submit this SQL code?
It could... but making it work generically would introduce some complexities. I think at a minimum, the "plugin" would have to allow selection of the input card/channel from a drop-down box.

I think this type functionality should probably be kept in the scope of utilities (or a fringe plug-in maybe). The "ideal" answer is probably to rework the UI of the TV channels setup. ...but I really don't understand all the issues given that MP functions in many different scenarios for different people. (e.g. Hard for me to understand not having LCN support, and hard for others to understand why some of us want it.)
__________________
Silverstone L013 - MSI K8N Neo4 - AMD3000+ (venice) - 1GB - 200GB SATA 7200.8 -
PVR-150MCE - Geforce 6600 -
Northbridge Zalman Heatsink - 1 too many fans - DirecTV - Non HDTV...yet
kaliatech is offline   Reply With Quote
Old 2005-11-08, 21:47   #4 (permalink)
Retired Team Member
 
mzemina's Avatar
 
Join Date: Feb 2005
Location: Ft Smith, AR
Posts: 2,045
Thanks: 35
Thanked 12 Times in 12 Posts

Country:


Default

Quote:
Originally Posted by kaliatech
It could... but making it work generically would introduce some complexities. I think at a minimum, the "plugin" would have to allow selection of the input card/channel from a drop-down box.
I agree!

Quote:
Originally Posted by kaliatech
I think this type functionality should probably be kept in the scope of utilities (or a fringe plug-in maybe). The "ideal" answer is probably to rework the UI of the TV channels setup. ...but I really don't understand all the issues given that MP functions in many different scenarios for different people. (e.g. Hard for me to understand not having LCN support, and hard for others to understand why some of us want it.)
Have you thought about talking with the developers regarding this? I'm not sure which would may have more insight and they maybe heads down trying to get 0.2.0 ready for a real beta release. But I can see that getting this problem solved would really help out quite a number of people. It could be an checkbox option to allow this LCN sorting or leave it as is.

Mike
mzemina is online now   Reply With Quote
Old 2005-11-15, 21:29   #5 (permalink)
Portal Member
 
Join Date: Jun 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Cheers mate, saved me a real chore
gerner is offline   Reply With Quote
Old 2005-12-16, 15:55   #6 (permalink)
Portal Member
 
Join Date: Mar 2005
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts


Default

What SQL commands could be used if I want to add 100's of dummy channels?

This is to fix the LCN (logical channel numbering) problem. I have 999 channels available in my satellite (starting at 200), so if I want to press 200 on my remote and get channel 200, I have to add 199 dummy/disabled channels.

If SQL channels are added in this way, does it somehow mess up the tv database indexing with MP?
gdirwin is offline   Reply With Quote
Old 2005-12-16, 20:17   #7 (permalink)
Portal Member
 
Join Date: Sep 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts


Default

The SQL would be something like this (I didn't test it):

Code:
INSERT INTO channels (idChannel, strChannel, iChannelNr, frequency, iSort, {etc columns})
VALUES (90000, '0dum', 0, 25000, 1, {etc values}) 

INSERT INTO channels (idChannel, strChannel, iChannelNr, frequency, iSort, {etc columns})
VALUES (90001, '1dum', 1, 25000, 2, {etc values})
You can get the entire list of column names using the SQLLite browser. I don't know what all the implications are with this workaround or if you should set the Visible field to 0, etc. You might also have to first edit all the existing iSort values so that they start at 100. (UPDATE channels SET iSort=iSort+100). I'm not really sure any more... I kind-of remember a channel sorting capability in the MP UI.
__________________
Silverstone L013 - MSI K8N Neo4 - AMD3000+ (venice) - 1GB - 200GB SATA 7200.8 -
PVR-150MCE - Geforce 6600 -
Northbridge Zalman Heatsink - 1 too many fans - DirecTV - Non HDTV...yet
kaliatech is offline   Reply With Quote
Reply

Bookmarks

Tags
config, external, mass, settops, updating

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
(original thread) MP-TVSeries Inker My TVSeries 666 2007-02-21 22:15
"Select channel by index" nonfunction in TVGuide and everywhere for External Channels Hesse 0.2.0.0 Final and SVN Builds 11 2006-09-26 12:11
Sorting radio channels – questions and workaround DocMarten General Support 1 2006-08-15 12:47
Problems with Webepg The_Stig WebEPG 23 2006-01-17 21:23
skystar2 usb not supported? felix968 General Support 8 2005-12-21 22:46


All times are GMT +1. The time now is 20:10.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden