Mailing List Archive

Re: Fwd: Re: channel4 hd has no eit - cross-eit
Here is something that used to work and no longer works.

Because Channel 4 HD does not have EIT data on Freesat, I used to copy the
EIT from Channel 4 with this line

/home/tv/bin/cross-eit.py -o /tmp/export.xml 19211,"hd.channel4.com"

and then add it to the schedule with this other line

/usr/bin/mythfilldatabase --refresh-all --verbose xmltv --file --sourceid 1
--xmlfile /tmp/export.xml

...all this after having visited

http://localhost/mythweb/settings/tv/channels

and ensured that the line for Channel 4 HD had an xmltvid of hd.channel4.com
and a useonairguide value of OFF.

However, while the cross-eit.py command produces a plausible export.xml
file, the mythfilldatabase command complains that it can't recognise
hd.channel4.com as an xmltv channel identifier, although I confirm that
that is the entry in the xmltvid column for the Channel 4 HD row in the
localhost/mythweb interface.

This used to work. Why does it no longer work and what can I do to fix it?

Thank you
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sep 2021 00:39:17 +0100, you wrote:

>Here is something that used to work and no longer works.
>
>Because Channel 4 HD does not have EIT data on Freesat, I used to copy the
>EIT from Channel 4 with this line
>
>/home/tv/bin/cross-eit.py -o /tmp/export.xml 19211,"hd.channel4.com"
>
>and then add it to the schedule with this other line
>
>/usr/bin/mythfilldatabase --refresh-all --verbose xmltv --file --sourceid 1
>--xmlfile /tmp/export.xml
>
>...all this after having visited
>
>http://localhost/mythweb/settings/tv/channels
>
>and ensured that the line for Channel 4 HD had an xmltvid of hd.channel4.com
>and a useonairguide value of OFF.
>
>However, while the cross-eit.py command produces a plausible export.xml
>file, the mythfilldatabase command complains that it can't recognise
>hd.channel4.com as an xmltv channel identifier, although I confirm that
>that is the entry in the xmltvid column for the Channel 4 HD row in the
>localhost/mythweb interface.
>
>This used to work. Why does it no longer work and what can I do to fix it?
>
>Thank you

What version of cross-eit.py are you using? What version of MythTV?
The only version of cross-eit.py I can find is a Python 2 version,
which will not work with current MythTV versions which are Python 3
only.
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 04:33, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> What version of cross-eit.py are you using? What version of MythTV?
> The only version of cross-eit.py I can find is a Python 2 version,
> which will not work with current MythTV versions which are Python 3
> only.
>


I am on MythTV Version : v32.0~master.202108251032.a2cdb9047a~ubuntu20.04.1

cross-eit did indeed stop working with the move to python 3 but I fixed it
in April 2020 and posted the working version here in this thread.
There used to be an archive at gossamer-threads.com but it seems to have
disappeared, or I would point you at the message. I can repost if useful.
Anyway the point is that I had already solved that issue, cross-eit is
running and is indeed producing a plausible xml file, and the part that
isn't working is importing that file with mythfilldatabase, with the error
I mentioned.
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On 05/09/2021 01:39, UB40D via mythtv-users wrote:
> This used to work. Why does it no longer work and what can I do to fix it?

What does the following database query yield?

select chanid,channum,sourceid,callsign,name from channel where
xmltvid='hd.channel4.com';

Does it indeed return at least a row having the value 1 in the sourceid
column?
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 08:08, Jan Ceuleers <jan.ceuleers@gmail.com> wrote:

> On 05/09/2021 01:39, UB40D via mythtv-users wrote:
> > This used to work. Why does it no longer work and what can I do to fix
> it?
>
> What does the following database query yield?
>
> select chanid,channum,sourceid,callsign,name from channel where
> xmltvid='hd.channel4.com';
>
> Does it indeed return at least a row having the value 1 in the sourceid
> column?
>

Good question! And the answer is yes:

mysql> select chanid,channum,sourceid,callsign,name from channel where
xmltvid='hd.channel4.com';
+--------+---------+----------+--------------+--------------+
| chanid | channum | sourceid | callsign | name |
+--------+---------+----------+--------------+--------------+
| 22200 | 21200 | 1 | Channel 4 HD | Channel 4 HD |
+--------+---------+----------+--------------+--------------+
1 row in set (0.00 sec)
You had me worried there for a moment, thinking that mythweb and the
database might be out of sync. But apparently not.
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
> xmltvid='hd.channel4.com';
> +--------+---------+----------+--------------+--------------+
> | chanid | channum | sourceid | callsign | name |
> +--------+---------+----------+--------------+--------------+
> | 22200 | 21200 | 1 | Channel 4 HD | Channel 4 HD |
> +--------+---------+----------+--------------+--------------+
>
>
BTW is there any significance to the fact that chanid and channum are not
the same? Should they be? What's the difference between the two?
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sep 2021 07:45:57 +0100, you wrote:

>On Sun, 5 Sept 2021 at 04:33, Stephen Worthington <stephen_agent@jsw.gen.nz>
>wrote:
>
>> What version of cross-eit.py are you using? What version of MythTV?
>> The only version of cross-eit.py I can find is a Python 2 version,
>> which will not work with current MythTV versions which are Python 3
>> only.
>>
>
>
>I am on MythTV Version : v32.0~master.202108251032.a2cdb9047a~ubuntu20.04.1
>
>cross-eit did indeed stop working with the move to python 3 but I fixed it
>in April 2020 and posted the working version here in this thread.
>There used to be an archive at gossamer-threads.com but it seems to have
>disappeared, or I would point you at the message. I can repost if useful.
>Anyway the point is that I had already solved that issue, cross-eit is
>running and is indeed producing a plausible xml file, and the part that
>isn't working is importing that file with mythfilldatabase, with the error
>I mentioned.

The list archive site is now here:

https://lists.archive.carbon60.com/mythtv/

but it does not seem to have your Python 3 version of cross-eit.py,
and Google does not find it either. So please repost it, and I will
have a go running it and see if I can see anything.

The mythfilldatabase output you posted is quite explicit in the error
it is finding: "Unknown xmltv channel identifier: Channel - Skipping
channel." Is that still the error you are getting? If so, the
xmltvid in the .xml file you are importing is not matching anything in
the database. What is the output of:

head /tmp/export.xml

Is there only one channel showing in the headers at the top of the
file? If you cut and paste the xmltvid from there into this query, is
that xmltvid found in the database?

select sourceid,chanid,channum,name,callsign,xmltvid from channel
where xmltvid='<paste here>';

If found, does the sourceid for the channel match the sourceid you are
using in the mythfilldatabase command?
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On 05/09/2021 08:54, UB40D via mythtv-users wrote:
>
>
> mysql> select chanid,channum,sourceid,callsign,name from channel
> where xmltvid='hd.channel4.com <http://hd.channel4.com>';
> +--------+---------+----------+--------------+--------------+
> | chanid | channum | sourceid | callsign     | name       |
> +--------+---------+----------+--------------+--------------+
> |  22200 | 21200   |        1 | Channel 4 HD | Channel 4 HD |
> +--------+---------+----------+--------------+--------------+
>
>
> BTW is there any significance to the fact that chanid and channum are
> not the same? Should they be? What's the difference between the two?
>
> _______________________________________________
> 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

I too converted cross-eit to use Python 3 and it is currently working
fine for me.

I have to edit the file when the clocks change as the line

date = dateobj + datetime.timedelta(seconds=time.altzone)

doesn't cope with the time change, do you have a fix?

As to your problem .

The 'chanid' value changes after every scan so i use something like.

select serviceid,chanid,channum,sourceid,callsign from channel where
callsign like("%Channel 4 HD%") ;

to get the correct value, however you have a valid xml file so that
should not be the issue.

I use the same mythfilldatabase command

/usr/bin/mythfilldatabase --refresh-all --verbose xmltv --file
--sourceid 1 --xmlfile /tmp/export.xml

So presuming sourceid is correct it should work.

What has changed recently on your system?

Have you recently scanned?
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 09:21, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

>
> The list archive site is now here:
>
> https://lists.archive.carbon60.com/mythtv/
>
> but it does not seem to have your Python 3 version of cross-eit.py,
> and Google does not find it either. So please repost it, and I will
> have a go running it and see if I can see anything.
>

Thanks. I reposted it now (with headers from the original message, showing
that the new list archive is missing at least that post and probably
others).

The mythfilldatabase output you posted is quite explicit in the error
> it is finding: "Unknown xmltv channel identifier: Channel - Skipping
> channel." Is that still the error you are getting?


Yes: that's as far as I got in my debugging---narrowing it down to that, so
I posted just the relevant line after figuring it out. But I could not
discover why.


> If so, the
> xmltvid in the .xml file you are importing is not matching anything in
> the database. What is the output of:
>
> head /tmp/export.xml
>

It appears that the data is all in one line so it's monstruously long, but
the first few screen lines go like this:

$ head /tmp/export.xml

<?xml version="1.0" ?>

<!DOCTYPE tv SYSTEM "xmltv.dtd">

<tv><programme channel="hd.channel4.com" start="20210821015000"
stop="20210821022000"><title>Come Dine with
Me</title><sub-title>Yeovil</sub-title><desc>PR manager Emmy hopes to
impress her guests with locally sourced Somerset produce. But she has a
disaster with her hollandaise sauce.
(Ep1/5)</desc><category>Entertainment</category></programme><programme
channel="hd.channel4.com" start="20210821022000"
stop="20210821024500"><title>Come Dine with
Me</title><sub-title>Yeovil</sub-title><desc>Radio DJ Steve serves up a
cross between comfort food and fine dining. But he feels the pressure, and
an unwanted ingredient ends up on one guest's plate.
(Ep2/5)</desc><category>Entertainment</category></programme><program

I can see the "hd.channel4.com" in there, which I assume has been generated
by the command line parameter I supplied to cross-eit.

I copied from stuff I did years ago, based on advice from kind people on
the list, and which worked then. I am not sure where this particular
identifier came from in the first place. When I looked at the table of all
channels in mythweb, this channel seemed to be the only one with an xmltvid.


> Is there only one channel showing in the headers at the top of the
> file?


yes


> If you cut and paste the xmltvid from there into this query, is
> that xmltvid found in the database?
>

yes


>
> select sourceid,chanid,channum,name,callsign,xmltvid from channel
> where xmltvid='<paste here>';
>


-> where xmltvid='hd.channel4.com';

+----------+--------+---------+--------------+--------------+-----------------+

| sourceid | chanid | channum | name | callsign | xmltvid
|

+----------+--------+---------+--------------+--------------+-----------------+

| 1 | 22200 | 21200 | Channel 4 HD | Channel 4 HD |
hd.channel4.com |

+----------+--------+---------+--------------+--------------+-----------------+

1 row in set (0.00 sec)






>
> If found, does the sourceid for the channel match the sourceid you are
> using in the mythfilldatabase command?
>

yes: the command used was

/usr/bin/mythfilldatabase --refresh-all --verbose xmltv --file --sourceid 1
--xmlfile /tmp/export.xml
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 09:23, John <jksjdevelop@gmail.com> wrote:

> I too converted cross-eit to use Python 3 and it is currently working fine
> for me.
>
> I have to edit the file when the clocks change as the line
>
> date = dateobj + datetime.timedelta(seconds=time.altzone)
>
> doesn't cope with the time change, do you have a fix?
>

I remember having to do the same change manually, probably following your
advice here on the list.

I have not fixed it so that it would do the change by itself. If I get it
to work again, I probably should. (Writing an if statement with last Sunday
in March / last Sunday in October---seems dumb but ought to work.)


> As to your problem .
>
> The 'chanid' value changes after every scan so i use something like.
>
> select serviceid,chanid,channum,sourceid,callsign from channel where
> callsign like("%Channel 4 HD%") ;
>
> to get the correct value, however you have a valid xml file so that should
> not be the issue.
>

In any case, your query gives the following on my system right now:

callsign like("%Channel 4 HD%") ;

+-----------+--------+---------+----------+--------------+

| serviceid | chanid | channum | sourceid | callsign |

+-----------+--------+---------+----------+--------------+

| 21200 | 22200 | 21200 | 1 | Channel 4 HD |

| 21200 | 31200 | 21200 | 1 | Channel 4 HD |

+-----------+--------+---------+----------+--------------+

2 rows in set (0.01 sec)

I am not sure why I get two. Maybe a relic of multiple scans? No clue which
is the "correct" one (if either is).


> I use the same mythfilldatabase command
>
> /usr/bin/mythfilldatabase --refresh-all --verbose xmltv --file --sourceid
> 1 --xmlfile /tmp/export.xml
>
> So presuming sourceid is correct it should work.
>
> What has changed recently on your system?
>
> Have you recently scanned?
>
For some definition of recently, yes (a few months ago).

I hate rescanning because it always messes up so much stuff. I did it
because I thought I was missing some channels that might have moved around.

Certainly the Channel 4 HD was no longer working after that; but I forget
if it was still working just before.
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 10:06, UB40D <ub40dd@googlemail.com> wrote:

>
>
> On Sun, 5 Sept 2021 at 09:21, Stephen Worthington <
> stephen_agent@jsw.gen.nz> wrote:
>
>>
>> The list archive site is now here:
>>
>> https://lists.archive.carbon60.com/mythtv/
>>
>> but it does not seem to have your Python 3 version of cross-eit.py,
>> and Google does not find it either. So please repost it, and I will
>> have a go running it and see if I can see anything.
>>
>
> Thanks. I reposted it now (with headers from the original message, showing
> that the new list archive is missing at least that post and probably
> others).
>

Actually it bounced: held for moderation because of message length.
So, meanwhile, here is a pastebin of just the script.

https://pastebin.com/d51VUASq
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sep 2021 08:54:25 +0100, you wrote:

>mysql> select chanid,channum,sourceid,callsign,name from channel where
>> xmltvid='hd.channel4.com';
>> +--------+---------+----------+--------------+--------------+
>> | chanid | channum | sourceid | callsign | name |
>> +--------+---------+----------+--------------+--------------+
>> | 22200 | 21200 | 1 | Channel 4 HD | Channel 4 HD |
>> +--------+---------+----------+--------------+--------------+
>>
>>
>BTW is there any significance to the fact that chanid and channum are not
>the same? Should they be? What's the difference between the two?

Chanid is an internal database index number generated automatically by
the channel scanning process. It is required to be unique. Channum
is the channel number used by the user to change to a channel in live
TV or the guide. There can be multiple channels with different chanid
values that have the same channum. For example, you may get the same
channel in HD from a DVB-T2 source, in SD from DVB-T and also from a
satellite or cable service. To distinguish between the different
channels with the same channum, the highest priority one will be used
first. You can set priority in quite complex ways, but usually you
will have higher priority for the HD versions of channels, either by
setting the channel table priority entry or by giving the DVB-T2
source higher priority.
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sep 2021 10:14:11 +0100
UB40D via mythtv-users <mythtv-users@mythtv.org> wrote:

> On Sun, 5 Sept 2021 at 09:23, John <jksjdevelop@gmail.com> wrote:
>
>
> In any case, your query gives the following on my system right now:
>
> mysql> select serviceid,chanid,channum,sourceid,callsign from channel
> mysql> where
> callsign like("%Channel 4 HD%") ;
>
> +-----------+--------+---------+----------+--------------+
>
> | serviceid | chanid | channum | sourceid | callsign |
>
> +-----------+--------+---------+----------+--------------+
>
> | 21200 | 22200 | 21200 | 1 | Channel 4 HD |
>
> | 21200 | 31200 | 21200 | 1 | Channel 4 HD |
>
> +-----------+--------+---------+----------+--------------+
>
> 2 rows in set (0.01 sec)
>
> I am not sure why I get two. Maybe a relic of multiple scans? No clue
> which is the "correct" one (if either is).
>
>

Maybe one of them has the deleted field set and is the one with
an xmltvid value. Try running the query

select serviceid,chanid,channum,sourceid,callsign,deleted,xmltvid from
channel where callsign like("%Channel 4 HD%") ;

Steve
--
____________________________________________________________________
Steve Evans E-mail: mailto:stevee@gorbag.com
Registered Linux user #217906: http://counter.li.org
Public Encryption Key: http://www.gorbag.com/public-key.html
____________________________________________________________________

5.10.61-gentoo Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz GNU/Linux

10:24:26 up 4 days, 23:00, 5 users, load average: 0.29, 0.10, 0.08

Whether weary or unweary, O man, do not rest,
Do not cease your single-handed struggle.
Go on, do not rest.
-- An old Gujarati hymn
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
Ok you had me going there. Ignore previous statements of mine!

The Channel to copy from is Channel 4 which does have listings

So select serviceid,chanid,channum,sourceid,callsign,deleted,xmltvid
from channel where callsign like("Channel 4");

+-----------+--------+---------+----------+-----------+---------------------+---------+
| serviceid | chanid | channum | sourceid | callsign? |
deleted???????????? | xmltvid |
+-----------+--------+---------+----------+-----------+---------------------+---------+
|????? 9211 |? 19211 | 60001?? |??????? 0 | Channel 4 | 2020-11-19
12:25:08 |???????? |
|????? 9211 |? 65692 | 113???? |??????? 1 | Channel 4 |
NULL??????????????? |???????? |
|????? 9212 |? 65693 | 60024?? |??????? 1 | Channel 4 |
NULL??????????????? |???????? |
|????? 9213 |? 65694 | 60025?? |??????? 1 | Channel 4 |
NULL??????????????? |???????? |
|????? 9214 |? 65695 | 60026?? |??????? 1 | Channel 4 |
NULL??????????????? |???????? |
|????? 9216 |? 65696 | 60027?? |??????? 1 | Channel 4 |
NULL??????????????? |???????? |
|????? 8320 |? 65827 | 60150?? |??????? 1 | Channel 4 |
NULL??????????????? |???????? |
+-----------+--------+---------+----------+-----------+---------------------+---------+
7 rows in set (0.001 sec)
So the chanid to use is the undeleted ones of the above.

I see I have your choice of 19211 marked as deleted so its probably no
longer used.


_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 10:31, Steve Evans <mythtv-users@gorbag.com> wrote:

>
> Maybe one of them has the deleted field set and is the one with
> an xmltvid value. Try running the query
>
> select serviceid,chanid,channum,sourceid,callsign,deleted,xmltvid from
> channel where callsign like("%Channel 4 HD%") ;
>
>
Aha! Well guessed! This one seems to be hitting paydirt!

mysql> select serviceid,chanid,channum,sourceid,callsign,deleted,xmltvid
from

-> channel where callsign like("%Channel 4 HD%") ;

+-----------+--------+---------+----------+--------------+---------------------+-----------------+

| serviceid | chanid | channum | sourceid | callsign | deleted
| xmltvid |

+-----------+--------+---------+----------+--------------+---------------------+-----------------+

| 21200 | 22200 | 21200 | 1 | Channel 4 HD | 2021-04-13
22:25:17 | hd.channel4.com |

| 21200 | 31200 | 21200 | 1 | Channel 4 HD | NULL
| |

+-----------+--------+---------+----------+--------------+---------------------+-----------------+

2 rows in set (0.00 sec)

So what's the proper fix going forward?
I'm guessing: deleting the chanid 22200 line manually from the database (or
perhaps via mythweb) and adding xmltvid hd.channel4.com to the other line?
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 10:25, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

>
> >BTW is there any significance to the fact that chanid and channum are not
> >the same? Should they be? What's the difference between the two?
>
> Chanid is an internal database index number generated automatically by
> the channel scanning process. It is required to be unique. Channum
> is the channel number used by the user to change to a channel in live
> TV or the guide. There can be multiple channels with different chanid
> values that have the same channum. For example, you may get the same
> channel in HD from a DVB-T2 source, in SD from DVB-T and also from a
> satellite or cable service. To distinguish between the different
> channels with the same channum, the highest priority one will be used
> first. You can set priority in quite complex ways, but usually you
> will have higher priority for the HD versions of channels, either by
> setting the channel table priority entry or by giving the DVB-T2
> source higher priority.


Thank you: this clarifies things a bit.

I'm still not quite sure I understand why I would want to assign channums
by myself. Is it so that (e.g.) BBC1 is number 1, BBC2 is number 2 and so
forth, instead of having to deal with five-digit chanids?

Also, I can't quite understand why I might want to retain several copies of
the same channel under the same channum. Wouldn't it be simpler and less
confusing to delete all of them except the HD one?
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 11:01, UB40D <ub40dd@googlemail.com> wrote:

> So what's the proper fix going forward?
> I'm guessing: deleting the chanid 22200 line manually from the database
> (or perhaps via mythweb) and adding xmltvid hd.channel4.com to the other
> line?
>

In the spirit of "make before break" I've just done the latter but not the
former. I have then re-run mythfilldatabase and it seems to work, although
I need to check more thoroughly before declaring victory. Anyway, thank you
very much Steve!
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On 05/09/2021 11:06, UB40D via mythtv-users wrote:
> On Sun, 5 Sept 2021 at 10:25, Stephen Worthington <stephen_agent@jsw.gen.nz>
> wrote:
>
>>
>>> BTW is there any significance to the fact that chanid and channum are not
>>> the same? Should they be? What's the difference between the two?
>>
>> Chanid is an internal database index number generated automatically by
>> the channel scanning process. It is required to be unique. Channum
>> is the channel number used by the user to change to a channel in live
>> TV or the guide. There can be multiple channels with different chanid
>> values that have the same channum. For example, you may get the same
>> channel in HD from a DVB-T2 source, in SD from DVB-T and also from a
>> satellite or cable service. To distinguish between the different
>> channels with the same channum, the highest priority one will be used
>> first. You can set priority in quite complex ways, but usually you
>> will have higher priority for the HD versions of channels, either by
>> setting the channel table priority entry or by giving the DVB-T2
>> source higher priority.
>
>
> Thank you: this clarifies things a bit.
>
> I'm still not quite sure I understand why I would want to assign channums
> by myself. Is it so that (e.g.) BBC1 is number 1, BBC2 is number 2 and so
> forth, instead of having to deal with five-digit chanids?
>
> Also, I can't quite understand why I might want to retain several copies of
> the same channel under the same channum. Wouldn't it be simpler and less
> confusing to delete all of them except the HD one?
>
Normally the channum is (in the UK, at least) taken from the on-air data. For Freeview it gives
repeatable low numbers which remain (mostly) the same even when the channel moves.

You might need more than one version of the channel for when you get scheduling conflicts: If a
transport is is use, say, which is recording from another channel (eg BBC 4 HD) and blocking the HD
version of Channel 4 HD then it will use the priority list to determine if there is an alternative
so that both recordings can progress. If not, it will look at the /program/ priorities and schedule
the lower one at a later time - if it can.

--

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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 09:23, John <jksjdevelop@gmail.com> wrote:

> I too converted cross-eit to use Python 3 and it is currently working fine
> for me.
>
> I have to edit the file when the clocks change as the line
>
> date = dateobj + datetime.timedelta(seconds=time.altzone)
>
> doesn't cope with the time change, do you have a fix?
>
>
>
While looking for errors, I just noticed the following line in my latest
mythfilldatabase log:

2021-09-05 11:10:35.405331 W No explicit time zone found, guessing
implicit UTC! Please consider enhancing the guide source to provide
explicit UTC or local time instead.

So perhaps a cleaner fix than the hack I suggested earlier might be to
supply the time zone in the exported xml file. It will take a bit of
digging around to figure out two things:

1 - How / where / in what format

2 - What the correct time zone should be. If I have to say UTC+0 in winter
and UTC+1 in summer then I still need that IF statement. I am not aware of
a way of saying "the time zone is whatever is current in the UK, so please
go and look it up in some library that the OS surely has". Or perhaps
that's what "local time" means, if I can figure out a way of saying that in
the xml file.
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sep 2021 10:18:15 +0100, you wrote:

>On Sun, 5 Sept 2021 at 10:06, UB40D <ub40dd@googlemail.com> wrote:
>
>>
>>
>> On Sun, 5 Sept 2021 at 09:21, Stephen Worthington <
>> stephen_agent@jsw.gen.nz> wrote:
>>
>>>
>>> The list archive site is now here:
>>>
>>> https://lists.archive.carbon60.com/mythtv/
>>>
>>> but it does not seem to have your Python 3 version of cross-eit.py,
>>> and Google does not find it either. So please repost it, and I will
>>> have a go running it and see if I can see anything.
>>>
>>
>> Thanks. I reposted it now (with headers from the original message, showing
>> that the new list archive is missing at least that post and probably
>> others).
>>
>
>Actually it bounced: held for moderation because of message length.
>So, meanwhile, here is a pastebin of just the script.
>
>https://pastebin.com/d51VUASq

Ok, I have played around with your cross-eit.py and I do not like at
all the way it creates huge line lengths. That can be a problem for a
program trying to read data into a buffer - maybe mythfilldatabase is
having that problem. So I have modified it to use the lxml library
instead of xml, and used lxml's pretty printing output option. I have
put it on my web server:

http://www.jsw.gen.nz/mythtv/cross-eit.py

If you do not already have the lxml package installed, on Ubuntu you
can install it with:

apt install python3-lxml

or it can be installed using pip.
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sep 2021 11:21:40 +0100, you wrote:

>On Sun, 5 Sept 2021 at 09:23, John <jksjdevelop@gmail.com> wrote:
>
>> I too converted cross-eit to use Python 3 and it is currently working fine
>> for me.
>>
>> I have to edit the file when the clocks change as the line
>>
>> date = dateobj + datetime.timedelta(seconds=time.altzone)
>>
>> doesn't cope with the time change, do you have a fix?
>>
>>
>>
>While looking for errors, I just noticed the following line in my latest
>mythfilldatabase log:
>
>2021-09-05 11:10:35.405331 W No explicit time zone found, guessing
>implicit UTC! Please consider enhancing the guide source to provide
>explicit UTC or local time instead.
>
>So perhaps a cleaner fix than the hack I suggested earlier might be to
>supply the time zone in the exported xml file. It will take a bit of
>digging around to figure out two things:
>
>1 - How / where / in what format
>
>2 - What the correct time zone should be. If I have to say UTC+0 in winter
>and UTC+1 in summer then I still need that IF statement. I am not aware of
>a way of saying "the time zone is whatever is current in the UK, so please
>go and look it up in some library that the OS surely has". Or perhaps
>that's what "local time" means, if I can figure out a way of saying that in
>the xml file.

The timezone data is added on each timestamp, so on each "start=" and
"stop=" in the XML file. Here is an example from my New Zealand
FreeviewHD data today:

<programme channel="aljazeera.freeviewnz.tv" start="20210905000000
+1200" stop="20210905003000 +1200">
<title>The Bottom Line</title>
<desc>G Host Steve Clemons asks former CDC director Tom Frieden
about where humanity stands in the fight against coronavirus.</desc>
<episode-num system="dd_progid">45899218</episode-num>
<rating system="Freeview">
<value>G</value>
</rating>
</programme>

New Zealand is 12 hours ahead of UTC on standard time, and 13 hours
ahead on daylight saving time, so during daylight saving the "+1200"
changes to "+1300" For the UK, I would suggest using "+0000" for
standard time and "+0100" for daylight saving time. If that field is
present, at the changeover between standard and daylight saving time,
an XMLTV file may have timestamps that have overlapping times, but do
not actually overlap when the timezone setting is taken into account.
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 05 Sep 2021 22:36:20 +1200, you wrote:

>On Sun, 5 Sep 2021 11:21:40 +0100, you wrote:
>
>>On Sun, 5 Sept 2021 at 09:23, John <jksjdevelop@gmail.com> wrote:
>>
>>> I too converted cross-eit to use Python 3 and it is currently working fine
>>> for me.
>>>
>>> I have to edit the file when the clocks change as the line
>>>
>>> date = dateobj + datetime.timedelta(seconds=time.altzone)
>>>
>>> doesn't cope with the time change, do you have a fix?
>>>
>>>
>>>
>>While looking for errors, I just noticed the following line in my latest
>>mythfilldatabase log:
>>
>>2021-09-05 11:10:35.405331 W No explicit time zone found, guessing
>>implicit UTC! Please consider enhancing the guide source to provide
>>explicit UTC or local time instead.
>>
>>So perhaps a cleaner fix than the hack I suggested earlier might be to
>>supply the time zone in the exported xml file. It will take a bit of
>>digging around to figure out two things:
>>
>>1 - How / where / in what format
>>
>>2 - What the correct time zone should be. If I have to say UTC+0 in winter
>>and UTC+1 in summer then I still need that IF statement. I am not aware of
>>a way of saying "the time zone is whatever is current in the UK, so please
>>go and look it up in some library that the OS surely has". Or perhaps
>>that's what "local time" means, if I can figure out a way of saying that in
>>the xml file.
>
>The timezone data is added on each timestamp, so on each "start=" and
>"stop=" in the XML file. Here is an example from my New Zealand
>FreeviewHD data today:
>
><programme channel="aljazeera.freeviewnz.tv" start="20210905000000
>+1200" stop="20210905003000 +1200">
> <title>The Bottom Line</title>
> <desc>G Host Steve Clemons asks former CDC director Tom Frieden
>about where humanity stands in the fight against coronavirus.</desc>
> <episode-num system="dd_progid">45899218</episode-num>
> <rating system="Freeview">
> <value>G</value>
> </rating>
></programme>
>
>New Zealand is 12 hours ahead of UTC on standard time, and 13 hours
>ahead on daylight saving time, so during daylight saving the "+1200"
>changes to "+1300" For the UK, I would suggest using "+0000" for
>standard time and "+0100" for daylight saving time. If that field is
>present, at the changeover between standard and daylight saving time,
>an XMLTV file may have timestamps that have overlapping times, but do
>not actually overlap when the timezone setting is taken into account.

And for the purposes of cross-eit.py, MythTV uses only UTC internally.
Mythfilldatabase will convert local times to UTC when it reads XMLTV
data. So all cross-eit.py need to do is to add " +0000" to the end of
each "start=" and "stop=" field and that should make that warning
message go away. In any case, it is just a warning and can be ignored
as mythfilldatabase is correctly assuming that the timestamps are UTC.
_______________________________________________
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: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 11:26, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

>
> Ok, I have played around with your cross-eit.py and I do not like at
> all the way it creates huge line lengths. That can be a problem for a
> program trying to read data into a buffer - maybe mythfilldatabase is
> having that problem. So I have modified it to use the lxml library
> instead of xml, and used lxml's pretty printing output option. I have
> put it on my web server:
>
> http://www.jsw.gen.nz/mythtv/cross-eit.py
>
> If you do not already have the lxml package installed, on Ubuntu you
> can install it with:
>
> apt install python3-lxml
>
> or it can be installed using pip.


Thank you, much appreciated. I also didn't like those long lines.

(BTW: "your" cross-eit.py is crediting me for more than I deserve, although
I know that's not what you meant.)

I'll use "your" cross-eit.py ;-) as the base when fixing the daylight time
offset issue.
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 11:36, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> The timezone data is added on each timestamp, so on each "start=" and
> "stop=" in the XML file. Here is an example from my New Zealand
> FreeviewHD data today:
>
> <programme channel="aljazeera.freeviewnz.tv" start="20210905000000
> +1200" stop="20210905003000 +1200">
> <title>The Bottom Line</title>
> <desc>G Host Steve Clemons asks former CDC director Tom Frieden
> about where humanity stands in the fight against coronavirus.</desc>
> <episode-num system="dd_progid">45899218</episode-num>
> <rating system="Freeview">
> <value>G</value>
> </rating>
> </programme>
>
> New Zealand is 12 hours ahead of UTC on standard time, and 13 hours
> ahead on daylight saving time, so during daylight saving the "+1200"
> changes to "+1300" For the UK, I would suggest using "+0000" for
> standard time and "+0100" for daylight saving time. If that field is
> present, at the changeover between standard and daylight saving time,
> an XMLTV file may have timestamps that have overlapping times, but do
> not actually overlap when the timezone setting is taken into account.
>

Thank you for the format example and for the caveat. I'll bear them in mind.
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On Sun, 5 Sept 2021 at 11:46, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> And for the purposes of cross-eit.py, MythTV uses only UTC internally.
> Mythfilldatabase will convert local times to UTC when it reads XMLTV
> data. So all cross-eit.py need to do is to add " +0000" to the end of
> each "start=" and "stop=" field and that should make that warning
> message go away. In any case, it is just a warning and can be ignored
> as mythfilldatabase is correctly assuming that the timestamps are UTC.


Err... either I can't understand what you are saying or some part of the
above is factually incorrect (or maybe does not apply to my setup).

I have experimentally observed the listings produced by cross-eit causing
recordings to miss one hour (either at the start or at the end, depending
on the direction of the mistake) if the one-line fix by John was not
applied at the right time of year.

1 2  View All