Mailing List Archive

Discovering missing xmltvids
Having just upgraded to fixes/33, I discover that a few of my channels suddenly no longer have
schedule information. The channels have the same xmltvids they had before but the grabber tells me
those numbers are no longer valid. It has been some time since I last upgraded and some of those may
have changed over time.

This is SchedulesDirect JSON, but not using the DB version.

All I did was to restore mythconverg and then run a "scan existing transports" scan, to see if those
channels had actually moved or something, apparently not.

I seem to recall there was an incantation to obtain all the xmltvids plus associated channel names
for your lineup as a list but cannot remember what I did nor find it.

Can anyone point me in the right direction?

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Discovering missing xmltvids [ In reply to ]
On Mon, 3 Jul 2023 at 22:32, Mike Perkins <mikep@randomtraveller.org.uk>
wrote:

> Having just upgraded to fixes/33, I discover that a few of my channels
> suddenly no longer have
> schedule information. The channels have the same xmltvids they had before
> but the grabber tells me
> those numbers are no longer valid. It has been some time since I last
> upgraded and some of those may
> have changed over time.
>
> This is SchedulesDirect JSON, but not using the DB version.
>
> All I did was to restore mythconverg and then run a "scan existing
> transports" scan, to see if those
> channels had actually moved or something, apparently not.
>
> I seem to recall there was an incantation to obtain all the xmltvids plus
> associated channel names
> for your lineup as a list but cannot remember what I did nor find it.
>
> Can anyone point me in the right direction?
>
>
The channel editor of mythtv-setup can restore xmltvid values from deleted
channels as described in
https://www.mythtv.org/wiki/Channel_Scanning#Restore_Data
This is a fairly new feature; in addition to xmltv id values it can also
restore the icon filename and the visible status from deleted channels.

Klaas.
Re: Discovering missing xmltvids [ In reply to ]
On 03/07/2023 22:39, Klaas de Waal wrote:
> On Mon, 3 Jul 2023 at 22:32, Mike Perkins <mikep@randomtraveller.org.uk>
> wrote:
>
>> Having just upgraded to fixes/33, I discover that a few of my channels
>> suddenly no longer have
>> schedule information. The channels have the same xmltvids they had before
>> but the grabber tells me
>> those numbers are no longer valid. It has been some time since I last
>> upgraded and some of those may
>> have changed over time.
>>
>> This is SchedulesDirect JSON, but not using the DB version.
>>
>> All I did was to restore mythconverg and then run a "scan existing
>> transports" scan, to see if those
>> channels had actually moved or something, apparently not.
>>
>> I seem to recall there was an incantation to obtain all the xmltvids plus
>> associated channel names
>> for your lineup as a list but cannot remember what I did nor find it.
>>
>> Can anyone point me in the right direction?
>>
>>
> The channel editor of mythtv-setup can restore xmltvid values from deleted
> channels as described in
> https://www.mythtv.org/wiki/Channel_Scanning#Restore_Data
> This is a fairly new feature; in addition to xmltv id values it can also
> restore the icon filename and the visible status from deleted channels.
>
Thank you. I did notice that button when I checked the channel list but did not know what it did so
left it alone.

My problem is that the channels in question already have an xmltvid which was previously correct,
but for some reason no longer matches what SD says is right for those channels. What I need is to
find a way to obtain the new values for those channels.

--

Mike Perkins


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Discovering missing xmltvids [ In reply to ]
I've had this happen to me

My solution (and I really hope there's a better way) was.

1. save my xmltv config file under a different name
2. run xmltv config and accept all channels to create a new config file
3. run the xmltv grabber for a single day and capture the output into a
file.
4. grep through the captured file to locate the channel headers at the
beginning of the file and note down their xmltvid.
5. Either modify the original xmltv config file to fix the changed xmltvids
or delete unwanted channels from the new config file.
6. Update mythtv with the new xmltvid values.

Just to be clear, I don't recommend this way but it did work.

Better suggestions gratefully received.


On Tue, 4 Jul 2023 at 09:42, Mike Perkins <mikep@randomtraveller.org.uk>
wrote:

> On 03/07/2023 22:39, Klaas de Waal wrote:
> > On Mon, 3 Jul 2023 at 22:32, Mike Perkins <mikep@randomtraveller.org.uk>
> > wrote:
> >
> >> Having just upgraded to fixes/33, I discover that a few of my channels
> >> suddenly no longer have
> >> schedule information. The channels have the same xmltvids they had
> before
> >> but the grabber tells me
> >> those numbers are no longer valid. It has been some time since I last
> >> upgraded and some of those may
> >> have changed over time.
> >>
> >> This is SchedulesDirect JSON, but not using the DB version.
> >>
> >> All I did was to restore mythconverg and then run a "scan existing
> >> transports" scan, to see if those
> >> channels had actually moved or something, apparently not.
> >>
> >> I seem to recall there was an incantation to obtain all the xmltvids
> plus
> >> associated channel names
> >> for your lineup as a list but cannot remember what I did nor find it.
> >>
> >> Can anyone point me in the right direction?
> >>
> >>
> > The channel editor of mythtv-setup can restore xmltvid values from
> deleted
> > channels as described in
> > https://www.mythtv.org/wiki/Channel_Scanning#Restore_Data
> > This is a fairly new feature; in addition to xmltv id values it can also
> > restore the icon filename and the visible status from deleted channels.
> >
> Thank you. I did notice that button when I checked the channel list but
> did not know what it did so
> left it alone.
>
> My problem is that the channels in question already have an xmltvid which
> was previously correct,
> but for some reason no longer matches what SD says is right for those
> channels. What I need is to
> find a way to obtain the new values for those channels.
>
> --
>
> Mike Perkins
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: Discovering missing xmltvids [ In reply to ]
On 04/07/2023 09:59, David Watkins wrote:
>
> On Tue, 4 Jul 2023 at 09:42, Mike Perkins <mikep@randomtraveller.org.uk>
> wrote:
>
>> On 03/07/2023 22:39, Klaas de Waal wrote:
>>> On Mon, 3 Jul 2023 at 22:32, Mike Perkins <mikep@randomtraveller.org.uk>
>>> wrote:
>>>
>>>> Having just upgraded to fixes/33, I discover that a few of my channels
>>>> suddenly no longer have
>>>> schedule information. The channels have the same xmltvids they had
>> before
>>>> but the grabber tells me
>>>> those numbers are no longer valid. It has been some time since I last
>>>> upgraded and some of those may
>>>> have changed over time.
>>>>
>>>> This is SchedulesDirect JSON, but not using the DB version.
>>>>
>>>> All I did was to restore mythconverg and then run a "scan existing
>>>> transports" scan, to see if those
>>>> channels had actually moved or something, apparently not.
>>>>
>>>> I seem to recall there was an incantation to obtain all the xmltvids
>> plus
>>>> associated channel names
>>>> for your lineup as a list but cannot remember what I did nor find it.
>>>>
>>>> Can anyone point me in the right direction?
>>>>
>>>>
>>> The channel editor of mythtv-setup can restore xmltvid values from
>> deleted
>>> channels as described in
>>> https://www.mythtv.org/wiki/Channel_Scanning#Restore_Data
>>> This is a fairly new feature; in addition to xmltv id values it can also
>>> restore the icon filename and the visible status from deleted channels.
>>>
>> Thank you. I did notice that button when I checked the channel list but
>> did not know what it did so
>> left it alone.
>>
>> My problem is that the channels in question already have an xmltvid which
>> was previously correct,
>> but for some reason no longer matches what SD says is right for those
>> channels. What I need is to
>> find a way to obtain the new values for those channels.
>>
> I've had this happen to me
>
> My solution (and I really hope there's a better way) was.
>
> 1. save my xmltv config file under a different name
> 2. run xmltv config and accept all channels to create a new config file
> 3. run the xmltv grabber for a single day and capture the output into a
> file.
> 4. grep through the captured file to locate the channel headers at the
> beginning of the file and note down their xmltvid.
> 5. Either modify the original xmltv config file to fix the changed xmltvids
> or delete unwanted channels from the new config file.
> 6. Update mythtv with the new xmltvid values.
>
> Just to be clear, I don't recommend this way but it did work.
>
> Better suggestions gratefully received.
>
I followed your instructions. No need to move or rename anything, though, just log in as a different
user! I use my own which is the one you get asked for on install, uid 1000.

That gave me a clean config file under ~/.xmltv which I then used to download a day's worth. Some of
the most important channels got fixed, I can take my time over most of the rest.

It seems to me that the information in the SD download ought to be usable in updating the channel
table and vice versa. Each <channel> stanza contains several possible callsigns and the matching
xmltvid.

I might try and do something simple-minded to provide a method of matching if I can find time. I
remember there was one before, it might have been written in Perl and was... interesting... to use.
However, it might only be of use here in the UK.

--

Mike Perkins


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Discovering missing xmltvids [ In reply to ]
Mike Perkins <mikep@randomtraveller.org.uk> wrote:

> Having just upgraded to fixes/33, I discover that a few of my channels suddenly no longer have schedule information. The channels have the same xmltvids they had before but the grabber tells me those numbers are no longer valid. It has been some time since I last upgraded and some of those may have changed over time.
>
> This is SchedulesDirect JSON, but not using the DB version.
>
> All I did was to restore mythconverg and then run a "scan existing transports" scan, to see if those channels had actually moved or something, apparently not.
>
> I seem to recall there was an incantation to obtain all the xmltvids plus associated channel names for your lineup as a list but cannot remember what I did nor find it.

Maintaining IDs is indeed a bit of a chore, but this is the script I use :
> #!/bin/bash
>
> # Get full xml listing and extract channel-ids & names
>
> base="/var/lib/mythtv/.xmltv"
> conf="${base}/tv_grab_sd_json.conf"
> chan_file="${base}/channels"
>
> rm ${conf}.full ${chan_file}.txt ${chan_file}.xml 2>/dev/null
>
> sed -e 's/channels/lineup/' < ${conf}.base > ${conf}.full
>
> tv_grab_zz_sdjson --config-file ${conf}.full --days 0 --output ${chan_file}.xml
> grep 'channel id
> display-name' < ${chan_file}.xml > ${chan_file}.txt


$ cat .xmltv/tv_grab_sd_json.conf.base
> cache=/var/lib/mythtv/.xmltv/tv_grab_sd_json.cache
> channel-id-format=mythtv
> username=username
> password=password
> mode=channels
> channels=GBR-1000040-DEFAULT

My grabber script grabs IDs from the channels table and adds them to the base config - for grabbing channel IDs I change “channels” to “lineup”.
The result is a file containing the IDs and names, like this :
> <channel id="106289">
> <display-name>ITV1 (Granada) HD</display-name>
> <display-name>ITV1GHD</display-name>
> <display-name>103</display-name>

Then it’s a case of opening this file in ${favourite_editor} and using it’s search function to find any IDs you are either missing or think have changed (and yes, I’ve seen the ID change for the same channel).

Probably not the most efficient or pretty way, but it works for me. If I had to do it more often I might try improving it - but as it’s only an occasional thing, it doesn’t really matter.

Simon


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