[mythtv] Hidden channels appear in browse mode
Chris Pinkham
cpinkham at bc2va.org
Sat Feb 5 22:13:54 UTC 2005
> I am running the CVS version from Feb 2. I have the "Always use browse mode
> when changing channels in LiveTV" option turned on.
>
> If I use the remote's up/down arrows to switch channels, the OSD displays
> all channels in the database, even the ones that don't appear in the EPG
> because they are marked invisible. Is this intentional?
When the 'visible' flag was added, browse mode wasn't modified to honor
the setting when browing channels. Changing browse mode to support the
visible flag looks like it would be just 1 line of code in tv_rec.cpp in
TVRec::DoGetNextChannel. I guess if it's not on the EPG then it probably
shouldn't be visible in browse mode. If you want to test a fix, edit
libs/libmythtv/tv_rec.cpp and search for TVRec::DoGetNextChannel. Find
the following section in that method:
QString wherepart = QString("cardinput.cardid = capturecard.cardid AND "
"capturecard.cardid = \"%1\" AND "
"capturecard.hostname = \"%2\" AND "
"cardinput.sourceid = channel.sourceid ")
.arg(cardid)
.arg(gContext->GetHostName());
Add a line below the "capturecard.hostname" line so it looks like this:
QString wherepart = QString("cardinput.cardid = capturecard.cardid AND "
"capturecard.cardid = \"%1\" AND "
"capturecard.hostname = \"%2\" AND "
"channel.visible = 1 "
"cardinput.sourceid = channel.sourceid ")
.arg(cardid)
.arg(gContext->GetHostName());
That should cause the code to only look at visible channels when trying to
find the next channel above or below the current one. I think that should
be all it needs to fix it for you. If it does, I can get the fix in CVS.
--
Chris
More information about the mythtv-dev
mailing list