Area: Media Portal Program
MP Version: 0.2
Stuff that doesn't matter: n/a
Pertinent portions of Log:
what it looks like
7/16/2006 4:43:07 AM ChangeChannelNr()
7/16/2006 4:43:07 AM UpdateOSD()
7/16/2006 4:43:07 AM window:MediaPortal.GUI.TV.GUITVZAPOSD init
7/16/2006 4:43:07 AM ZAP OSD:ON
7/16/2006 4:43:11 AM g_Player.Stop()
what it should look like
7/16/2006 4:47:10 AM ChangeChannelNr()
7/16/2006 4:47:10 AM UpdateOSD()
7/16/2006 4:47:10 AM window:MediaPortal.GUI.TV.GUITVZAPOSD init
7/16/2006 4:47:10 AM ZAP OSD:ON
7/16/2006 4:47:10 AM Channel change:206 ESPN
7/16/2006 4:47:10 AM GUITVHome.ViewChannel(): View channel=206 ESPN ts:True
7/16/2006 4:47:10 AM g_Player.Stop()
Synopsis:
When using an external set top box, it's not possible to change channels via logical channel numbering. It is possible using indexing.
The Issue:
When attempting to use logical channel numbering (unchecking the box "Select channel number by index (non-us)", to change channels for an external box, it does not work. I did some research on the subject. When this option is set, it calls GUITVHome.Navigator.ZapToChannelNumber to change the channel. (Otherwise it calls GUITVHome.Navigator.ZapToChannel to change the channel by index number).
This is in \WindowsPlugins\GUITV\GUITVHome.cs -
.. snipped
public void ZapToChannelNumber( int channelNr, bool useZapDelay )
{
List<TVChannel> channels = CurrentGroup.TvChannels;
if ( channelNr >= 0 )
{
bool found = false;
int ChannelCnt = 0;
TVChannel chan;
while ( found == false && ChannelCnt < channels.Count )
{
chan = (TVChannel)channels[ChannelCnt];
if ( chan.Number == channelNr )
{
ZapToChannel(chan.Name, useZapDelay);
found = true;
}
else
ChannelCnt++;
}
}
}
Well, a quick look at the code and it's obvious why it does not work. chan.Number for external channels is set to 25000+. This loops until it has looked at all the channels in the dataset, looking for a match. Even if the dataset had over 25000 entries, it still wouldn't hit the correct channel. :wink:
The solution (possibly):
Add an if statement to the code to check if the channel is listed in the External Channel List. (There are other ways to tackle it, but I think this is the simplest.) So it would look something like this:
public void ZapToChannelNumber( int channelNr, bool useZapDelay )
{
List<TVChannel> channels = CurrentGroup.TvChannels;
if ( channelNr >= 0 )
{
bool found = false;
int ChannelCnt = 0;
TVChannel chan;
while ( found == false && ChannelCnt < channels.Count )
{
chan = (TVChannel)channels[ChannelCnt];
if ( chan.Number == channelNr )
{
ZapToChannel(chan.Name, useZapDelay);
found = true;
}
else if (chan.EternalTunerChannel == channelNr)
{
ZapToChannel(chan.Name, useZapDelay);
found = true;
}
else
ChannelCnt++;
}
}
}
}
I'm not exactly sure on the syntax, if chan.ExternalTunerChannel is available, or if this would even work.
Thank you for your attention!
P.S. It'd be nice to get something similar working in the epg.
P.P.S. The posting process seems to have gotten rid of my formatting in the code...
MP Version: 0.2
Stuff that doesn't matter: n/a
Pertinent portions of Log:
what it looks like
7/16/2006 4:43:07 AM ChangeChannelNr()
7/16/2006 4:43:07 AM UpdateOSD()
7/16/2006 4:43:07 AM window:MediaPortal.GUI.TV.GUITVZAPOSD init
7/16/2006 4:43:07 AM ZAP OSD:ON
7/16/2006 4:43:11 AM g_Player.Stop()
what it should look like
7/16/2006 4:47:10 AM ChangeChannelNr()
7/16/2006 4:47:10 AM UpdateOSD()
7/16/2006 4:47:10 AM window:MediaPortal.GUI.TV.GUITVZAPOSD init
7/16/2006 4:47:10 AM ZAP OSD:ON
7/16/2006 4:47:10 AM Channel change:206 ESPN
7/16/2006 4:47:10 AM GUITVHome.ViewChannel(): View channel=206 ESPN ts:True
7/16/2006 4:47:10 AM g_Player.Stop()
Synopsis:
When using an external set top box, it's not possible to change channels via logical channel numbering. It is possible using indexing.
The Issue:
When attempting to use logical channel numbering (unchecking the box "Select channel number by index (non-us)", to change channels for an external box, it does not work. I did some research on the subject. When this option is set, it calls GUITVHome.Navigator.ZapToChannelNumber to change the channel. (Otherwise it calls GUITVHome.Navigator.ZapToChannel to change the channel by index number).
This is in \WindowsPlugins\GUITV\GUITVHome.cs -
.. snipped
public void ZapToChannelNumber( int channelNr, bool useZapDelay )
{
List<TVChannel> channels = CurrentGroup.TvChannels;
if ( channelNr >= 0 )
{
bool found = false;
int ChannelCnt = 0;
TVChannel chan;
while ( found == false && ChannelCnt < channels.Count )
{
chan = (TVChannel)channels[ChannelCnt];
if ( chan.Number == channelNr )
{
ZapToChannel(chan.Name, useZapDelay);
found = true;
}
else
ChannelCnt++;
}
}
}
Well, a quick look at the code and it's obvious why it does not work. chan.Number for external channels is set to 25000+. This loops until it has looked at all the channels in the dataset, looking for a match. Even if the dataset had over 25000 entries, it still wouldn't hit the correct channel. :wink:
The solution (possibly):
Add an if statement to the code to check if the channel is listed in the External Channel List. (There are other ways to tackle it, but I think this is the simplest.) So it would look something like this:
public void ZapToChannelNumber( int channelNr, bool useZapDelay )
{
List<TVChannel> channels = CurrentGroup.TvChannels;
if ( channelNr >= 0 )
{
bool found = false;
int ChannelCnt = 0;
TVChannel chan;
while ( found == false && ChannelCnt < channels.Count )
{
chan = (TVChannel)channels[ChannelCnt];
if ( chan.Number == channelNr )
{
ZapToChannel(chan.Name, useZapDelay);
found = true;
}
else if (chan.EternalTunerChannel == channelNr)
{
ZapToChannel(chan.Name, useZapDelay);
found = true;
}
else
ChannelCnt++;
}
}
}
}
I'm not exactly sure on the syntax, if chan.ExternalTunerChannel is available, or if this would even work.
Thank you for your attention!
P.S. It'd be nice to get something similar working in the epg.
P.P.S. The posting process seems to have gotten rid of my formatting in the code...