Mailing List Archive

Channel list in Program Guide
The Program Guide displayed by mythfrontend shows all channels in the
database. This includes the channels from videosources that are not
connected to a capturecard and thus can never be tuned to or recorded
from.

I think this is wrong; the Program Guide should only show channels
that can be used, so only channels from videosources that are
connected to a capturecard.

This can be easily implemented by a fix in
ChannelUtil::LoadChannels(), file channelutil.cpp:2396, change "LEFT
JOIN capturecard..." with "RIGHT JOIN capturecard ..." .

For mythtv-setup and mythfrontend this works OK but would it break
anything else, e.g. the services API or so?

Groetjes,
Klaas.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On 7/13/19 3:56 PM, Klaas de Waal wrote:
> The Program Guide displayed by mythfrontend shows all channels in the
> database. This includes the channels from videosources that are not
> connected to a capturecard and thus can never be tuned to or recorded
> from.
>
> I think this is wrong; the Program Guide should only show channels
> that can be used, so only channels from videosources that are
> connected to a capturecard.
>
> This can be easily implemented by a fix in
> ChannelUtil::LoadChannels(), file channelutil.cpp:2396, change "LEFT
> JOIN capturecard..." with "RIGHT JOIN capturecard ..." .
>
> For mythtv-setup and mythfrontend this works OK but would it break
> anything else, e.g. the services API or so?
>
> Groetjes,
> Klaas.

Klaas,

Just three quick tests:

api --endpoint Channel/GetChannelInfoList > /tmp/gcil.api
api --endpoint Channel/GetChannelInfo?ChanId=1021>/tmp/gci2-1.api
api --endpoint Guide/GetProgramGuide?StartTime=2019-07-13T00:00:00\&EndTime=2020-01-01T00:00:00 > /tmp/gpg.api

Changed to the RIGHT JOIN and reran, then diffed the results

api --endpoint Channel/GetChannelInfoList > /tmp/gcil.api.rj
api --endpoint Channel/GetChannelInfo?ChanId=1021>/tmp/gci2-1.api.rj
api --endpoint Guide/GetProgramGuide?StartTime=2019-07-13T00:00:00\&EndTime=2020-01-01T00:00:00 > /tmp/gpg.api.rj

The 1st two give identical results. The third *may* reverse channels that
are the same, but appear on different sources such as:

< "ChanId": "1051",
---
> "ChanId": "2605",
13803c13803
< "IconURL": "/Guide/GetChannelIcon?ChanId=1051",
---
> "IconURL": "/Guide/GetChannelIcon?ChanId=2605",

In the above, 1051 is my OTA channel 5-1 and 2605 is the same, but
from my cable provider.

Here's the interesting part. I reran the third test with the RIGHT JOIN
change still in place and got similar results (with OTA & cable channels.)

A recording just started, but I will remove the solution and see if the differences
show up without it.

--
Bill
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On Sat, Jul 13, 2019 at 10:56:31PM +0200, Klaas de Waal wrote:
> The Program Guide displayed by mythfrontend shows all channels in the
> database. This includes the channels from videosources that are not
> connected to a capturecard and thus can never be tuned to or recorded
> from.
>
> I think this is wrong; the Program Guide should only show channels
> that can be used, so only channels from videosources that are
> connected to a capturecard.
>
> This can be easily implemented by a fix in
> ChannelUtil::LoadChannels(), file channelutil.cpp:2396, change "LEFT
> JOIN capturecard..." with "RIGHT JOIN capturecard ..." .

Why not plain, INNER JOIN instead?

> For mythtv-setup and mythfrontend this works OK but would it break
> anything else, e.g. the services API or so?

I don't know. It should certainly only be done for guide and related
queries. Queries dealing with recorded and oldrecorded most
definitely need to referenced channels that might not still be
connected to inputs.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On 7/13/19 4:49 PM, Bill Meek wrote:
> On 7/13/19 3:56 PM, Klaas de Waal wrote:
>> The Program Guide displayed by mythfrontend shows all channels in the
>> database. This includes the channels from videosources that are not
>> connected to a capturecard and thus can never be tuned to or recorded
>> from.
>>
>> I think this is wrong; the Program Guide should only show channels
>> that can be used, so only channels from videosources that are
>> connected to a capturecard.
>>
>> This can be easily implemented by a fix in
>> ChannelUtil::LoadChannels(), file channelutil.cpp:2396, change "LEFT
>> JOIN capturecard..." with "RIGHT JOIN capturecard ..." .
>>
>> For mythtv-setup and mythfrontend this works OK but would it break
>> anything else, e.g. the services API or so?
>>
>> Groetjes,
>> Klaas.
>
> Klaas,
>
> Just three quick tests:
>
> api --endpoint Channel/GetChannelInfoList > /tmp/gcil.api
> api --endpoint Channel/GetChannelInfo?ChanId=1021>/tmp/gci2-1.api
> api --endpoint Guide/GetProgramGuide?StartTime=2019-07-13T00:00:00\&EndTime=2020-01-01T00:00:00 > /tmp/gpg.api
>
> Changed to the RIGHT JOIN and reran, then diffed the results
>
> api --endpoint Channel/GetChannelInfoList > /tmp/gcil.api.rj
> api --endpoint Channel/GetChannelInfo?ChanId=1021>/tmp/gci2-1.api.rj
> api --endpoint Guide/GetProgramGuide?StartTime=2019-07-13T00:00:00\&EndTime=2020-01-01T00:00:00 > /tmp/gpg.api.rj
>
> The 1st two give identical results. The third *may* reverse channels that
> are the same, but appear on different sources such as:
>
> <                 "ChanId": "1051",
> ---
> >                 "ChanId": "2605",
> 13803c13803
> <                 "IconURL": "/Guide/GetChannelIcon?ChanId=1051",
> ---
> >                 "IconURL": "/Guide/GetChannelIcon?ChanId=2605",
>
> In the above, 1051 is my OTA channel 5-1 and 2605 is the same, but
> from my cable provider.
>
> Here's the interesting part. I reran the third test with the RIGHT JOIN
> change still in place and got similar results (with OTA & cable channels.)
>
> A recording just started, but I will remove the solution and see if the differences
> show up without it.
>

The differences seen with the RIGHT JOIN exist in the LEFT JOIN. It appears
to be a non-issue.

--
Bill
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On Sun, 14 Jul 2019 at 03:11, David Engel <david@istwok.net> wrote:
>
> On Sat, Jul 13, 2019 at 10:56:31PM +0200, Klaas de Waal wrote:
> > The Program Guide displayed by mythfrontend shows all channels in the
> > database. This includes the channels from videosources that are not
> > connected to a capturecard and thus can never be tuned to or recorded
> > from.
> >
> > I think this is wrong; the Program Guide should only show channels
> > that can be used, so only channels from videosources that are
> > connected to a capturecard.
> >
> > This can be easily implemented by a fix in
> > ChannelUtil::LoadChannels(), file channelutil.cpp:2396, change "LEFT
> > JOIN capturecard..." with "RIGHT JOIN capturecard ..." .
>
> Why not plain, INNER JOIN instead?
>
Yes, INNER JOIN is better here. After some thinking I realized that channels
without a capture card are not good for presentation in the guide but that
capture cards without channels are even worse. Thanks.

> > For mythtv-setup and mythfrontend this works OK but would it break
> > anything else, e.g. the services API or so?
>
> I don't know. It should certainly only be done for guide and related
> queries. Queries dealing with recorded and oldrecorded most
> definitely need to referenced channels that might not still be
> connected to inputs.
>
As far as I can find in my logs ChannelUtil::LoadChannels() is used only
to generate the channel list for the Program Guide. Searching through the
source code does not show additional places where it is used.
As this fix also does not seem to break the services API (thanks Bill)
I will go forward with this.

Thanks,
Klaas.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On July 14, 2019 8:46:04 AM EDT, Klaas de Waal <klaas.de.waal@gmail.com> wrote:
>On Sun, 14 Jul 2019 at 03:11, David Engel <david@istwok.net> wrote:
>>
>> On Sat, Jul 13, 2019 at 10:56:31PM +0200, Klaas de Waal wrote:
>> > The Program Guide displayed by mythfrontend shows all channels in
>the
>> > database. This includes the channels from videosources that are not
>> > connected to a capturecard and thus can never be tuned to or
>recorded
>> > from.
>> >
>> > I think this is wrong; the Program Guide should only show channels
>> > that can be used, so only channels from videosources that are
>> > connected to a capturecard.
>> >
>> > This can be easily implemented by a fix in
>> > ChannelUtil::LoadChannels(), file channelutil.cpp:2396, change
>"LEFT
>> > JOIN capturecard..." with "RIGHT JOIN capturecard ..." .
>>
>> Why not plain, INNER JOIN instead?
>>
>Yes, INNER JOIN is better here. After some thinking I realized that
>channels
>without a capture card are not good for presentation in the guide but
>that
>capture cards without channels are even worse. Thanks.
>
>> > For mythtv-setup and mythfrontend this works OK but would it break
>> > anything else, e.g. the services API or so?
>>
>> I don't know. It should certainly only be done for guide and related
>> queries. Queries dealing with recorded and oldrecorded most
>> definitely need to referenced channels that might not still be
>> connected to inputs.
>>
>As far as I can find in my logs ChannelUtil::LoadChannels() is used
>only
>to generate the channel list for the Program Guide. Searching through
>the
>source code does not show additional places where it is used.
>As this fix also does not seem to break the services API (thanks Bill)
>I will go forward with this.
>
>Thanks,
>Klaas.
>_______________________________________________
>mythtv-dev mailing list
>mythtv-dev@mythtv.org
>http://lists.mythtv.org/mailman/listinfo/mythtv-dev
>http://wiki.mythtv.org/Mailing_List_etiquette
>MythTV Forums: https://forum.mythtv.org

A couple of things to you might want to check:

1) Is mythweb still supported? I ask because I'm on v29 where it IS supported. If it is, make sure mythweb's channel editor still shows all channels.

2) I assume the main reason for preserving "obsolete" channel records is so they can be used in "Watch Recordings" where you could still have recordings made using those old channels. That's the reason I still have old channels in my database. So, make sure such recordings still show channum, callsign info in the "Watch Recordings" screen for recordings made with "obsolete" channels.

I'd also like to point out that there is a manual solution to the issue Klaas raises, namely the "visible" flag in the channel database. If that is cleared, the channel won't show up in the Program Guide. I think mythtv-setup provides the means to change whether a channel is visible, and I know mythweb does support it.

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
This change does not affect the database, all channels and
videosources are still there. It is only about the selection of
channels that are shown in the Program Guide of mythfrontend. The
Program Guide willl now show only the channels that can be associated
with a tuner/capture card instead of all channels in the database.

On normal MythTV system, as opposed to one used for development, each
videosource is connected to a capture card so there is no difference
at all. If there is an unconnected videosource then this is probably a
configuration mistake and therefore mythtv-setup now gives a warning
message on exit in this situation.

In my development system, where there are tuners for terrestrial,
cable and satellite, it is very convenient if only the channels from
the currently connected videosource are shown.
Note that each satellite has several hunderd or more channels so
changing the visible flag for each channel is not really convenient.
Deleting all channels and doing a rescan is always an option but this
takes 15 minutes or so.

Groetjes,
Klaas.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On 07/15/2019 04:13 AM, Klaas de Waal wrote:
> This change does not affect the database, all channels and
> videosources are still there. It is only about the selection of
> channels that are shown in the Program Guide of mythfrontend. The
> Program Guide willl now show only the channels that can be associated
> with a tuner/capture card instead of all channels in the database.
>
> On normal MythTV system, as opposed to one used for development, each
> videosource is connected to a capture card so there is no difference
> at all. If there is an unconnected videosource then this is probably a
> configuration mistake and therefore mythtv-setup now gives a warning
> message on exit in this situation.
>
> In my development system, where there are tuners for terrestrial,
> cable and satellite, it is very convenient if only the channels from
> the currently connected videosource are shown.
> Note that each satellite has several hunderd or more channels so
> changing the visible flag for each channel is not really convenient.
> Deleting all channels and doing a rescan is always an option but this
> takes 15 minutes or so.

Another option to consider is using the already-existing channel group
functionality. Having a "connected channels" group (though I hope
someone can come up with a better name for it :) that's created
on-the-fly with your query (so it's always kept up to date, even as the
system changes) and setting it up to be used by default (unless the user
is already using some other group) would give the ability to see only
what's available for recording, but would also allow viewing listings
(if available) for other channels in the system for those who might want to.

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On Mon, 15 Jul 2019 at 17:48, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>
>
> Another option to consider is using the already-existing channel group
> functionality. Having a "connected channels" group (though I hope
> someone can come up with a better name for it :) that's created
> on-the-fly with your query (so it's always kept up to date, even as the
> system changes) and setting it up to be used by default (unless the user
> is already using some other group) would give the ability to see only
> what's available for recording, but would also allow viewing listings
> (if available) for other channels in the system for those who might want to.
>
This is an interesting thought. It can even be extended to having a
separate channel group per videosource. This would make it possible to
switch the Program Guide from e.g. terrestrial to cable or from one
satellite to another while the system is running.
An additional challenge would be then to insure that if you select a
program on one videosource that the program is indeed recorded from
that videosource and not from another where the same program is also
present.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Channel list in Program Guide [ In reply to ]
On 16/07/2019 18:05, Klaas de Waal wrote:
> On Mon, 15 Jul 2019 at 17:48, Michael T. Dean <mtdean@thirdcontact.com> wrote:
>>
>> Another option to consider is using the already-existing channel group
>> functionality. Having a "connected channels" group (though I hope
>> someone can come up with a better name for it :) that's created
>> on-the-fly with your query (so it's always kept up to date, even as the
>> system changes) and setting it up to be used by default (unless the user
>> is already using some other group) would give the ability to see only
>> what's available for recording, but would also allow viewing listings
>> (if available) for other channels in the system for those who might want to.
>>
> This is an interesting thought. It can even be extended to having a
> separate channel group per videosource. This would make it possible to
> switch the Program Guide from e.g. terrestrial to cable or from one
> satellite to another while the system is running.
> An additional challenge would be then to insure that if you select a
> program on one videosource that the program is indeed recorded from
> that videosource and not from another where the same program is also
> present.

Klaas,

Not sure about:

An additional challenge would be then to insure that if you select a
program on one videosource that the program is indeed recorded from
that videosource and not from another where the same program is also
present.

In UK we have Freeview (DVB-T/T2 OTA) and Freesat (DVB-S/S2 Satellite)
which have a lot of channels in common, and are often assigned the same
channel number but have different videosources.

Which tuner to be used is determined by the Scheduler taking account of
livetvorder and schedorder in capturecard table.

It is common for the schedorder to be changed to prefer certain tuners
over others e.g. prefer Freeview over Freesat by changing the priority
of schedorder in Input Connections.

It is also common when there are a number of tuners e.g. I have 4 for
Freeview and 2 for Freesat to change the livetvorder and schedorder so
that LiveTV does not get interrupted so often by the Scheduler wanting
to use the tuner for recording even though other tuners are free.

Certainly use could be made of existing Channel Group functionality
(mythfrontend Setup>Video>Channel Groups), which is common across
frontends, not per frontend.

I did a quick test (on current mythtv master) and created two new
Channel Groups (fv and fs) selected a few channels for each Channel
Group and could switch between them using (key /).

It just cycles All Channels,fs,fv. However having selected a channel to
watch,  pressing key s to bring up  Programme Guide defaults to All
Channels.

There also seems to a bug in that having created fv and fs, only
Favourites and fs show up going back into the Channel Groups screen, the
channels for fv show up under Favourites.

Mike

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org