Mailing List Archive

1 2  View All
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
On 06/09/2021 07:09, UB40D via mythtv-users wrote:
> 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.
>
It may depend on how your system clock is set. Have you configured it for UTC or for local time? If
the latter, then I would expect to see the effects you describe.

Whenever I install a new system (which is far too frquently these days) hardware RTC setting is one
of the questions Debian asks. All my boxes are set to UTC. I have no problems displaying times
according to local requirements and I have never had any issues with mythtv.

--

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 ]
Just to muddy the waters a bit, I did do some work a while ago to update
the python script to use python3 and to use the services api. I also sorted
out some of the problems with incorrect times and the like.

I've put a copy here https://pastebin.com/0tQFPBRB

It'll tell you what it does:
$ python3 cross-eit2.py -h
usage: cross-eit2.py [-h] [--debug] [--digest <user:pass>] [--forcehd]
[--host <hostname>] [--output <file>] [--port <port>]
[--shift <time shift>] [--version]
chanidN,xmlidN [chanidN,xmlidN ...]

Fetch EPG data for specified channels from a mythtv database and export this
data to an XMLTV formatted XML file

positional arguments:
chanidN,xmlidN list of chanid & xmlid pairs e.g. chanid1,xmlid1
chanid2,xmlid2 chanidN,xmlidN

optional arguments:
-h, --help show this help message and exit
--debug turn on debug messages (False)
--digest <user:pass> digest username:password
--forcehd forces all output programmes to be flagged as HD
(False)
--host <hostname> backend hostname (localhost)
--output <file> output XML file name (./output.xml)
--port <port> port number of the Services API (6544)
--shift <time shift> time in minutes to move programme data (0)
--version show program's version number and exit

Default values are in ()s


So for channel4HD I take the data from chaniid 18312 which is my Channel4+1
and invoke it like this:
/usr/bin/python3 /home/mythtv/scripts/cross-eit2.py
--output=/tmp/export.xml --forcehd --shift -60 18312,ch4.guide >
/home/mythtv/scripts/cross-eit2.out

and then I run mythfilldatabase like this:
/usr/bin/mythfilldatabase -v --loglevel debug --file --sourceid 1 --xmlfile
/tmp/export.xml > /home/mythtv/scripts/mythfilldatabase.out


I was going to do some more work on it but of course once I'd got it
working something else came along and it got sidelined. Still, it might
help someone out...

Cheers

On Mon, 30 Dec 2019 at 12:40, John <jksjdevelop@gmail.com> wrote:

> On 29/12/2019 18:10, UB40D wrote:
>
>
>
> On Sun, 29 Dec 2019 at 16:37, John <jksjdevelop@gmail.com> wrote:
>
>> On Freesat Channel 4 HD does indeed have no EIT
>>
>
> Argh! Weird and unexpected, but this explains things!
>
>
>> One solution is to copy the EIT from channel 4 using
>> https://www.mythtv.org/wiki/Cross-eit.py
>>
>> I run this once a day using cron
>>
>
> Thanks very much for this tip.
>
> I have managed to extract a channel number for channel 4 as follows:
>
> mysql -u tv -p mythconverg -e "SELECT chanid,callsign from channel WHERE
> callsign='Channel 4'"
> Enter password:
> +--------+-----------+
> | chanid | callsign |
> +--------+-----------+
> | 10211 | Channel 4 |
> | 10212 | Channel 4 |
> | 10213 | Channel 4 |
> | 10214 | Channel 4 |
> | 10216 | Channel 4 |
> | 9320 | Channel 4 |
> +--------+-----------+
>
> (I have no idea why I have so many; this happens with several other
> channels too, even when I restart from a clean scan)
>
> Anyway, I plugged the first of these numbers into a command line for
> cross-eit, as follows, and I managed to produce an xml file:
>
> ./cross-eit.py -o /tmp/export.xml "10211,Channel 4 HD"
>
> ...and I confirm the file had stuff that looked sensible; however I was
> not able to import it into the database. What I tried was
>
> mythfilldatabase --refresh-all --verbose xmltv --file --sourceid 1
> --xmlfile /tmp/export.xml
> ****************************************************
> WARNING: --refresh-all has been deprecated
> use --refresh instead
> ****************************************************
>
> 2019-12-29 18:02:24.010591 C mythfilldatabase version: fixes/29
> [v29.1-40-g951f1fe] www.mythtv.org
> 2019-12-29 18:02:24.010611 C Qt version: compile: 5.5.1, runtime: 5.9.5
> 2019-12-29 18:02:24.010615 N Enabled verbose msgs: general xmltv
> 2019-12-29 18:02:24.010627 N Setting Log Level to LOG_INFO
> 2019-12-29 18:02:24.021071 I Bypassing grabbers, reading directly from
> file
> 2019-12-29 18:02:24.021656 I Setup Interrupt handler
> 2019-12-29 18:02:24.021671 I Setup Terminated handler
> 2019-12-29 18:02:24.021679 I Setup Segmentation fault handler
> 2019-12-29 18:02:24.021689 I Setup Aborted handler
> 2019-12-29 18:02:24.021713 I Setup Bus error handler
> 2019-12-29 18:02:24.021723 I Setup Floating point exception handler
> 2019-12-29 18:02:24.021731 I Setup Illegal instruction handler
> 2019-12-29 18:02:24.021743 I Setup Real-time signal 0 handler
> 2019-12-29 18:02:24.021754 I Setup Hangup handler
> 2019-12-29 18:02:24.021801 I Added logging to the console
> 2019-12-29 18:02:24.021877 N Using runtime prefix = /usr
> 2019-12-29 18:02:24.021881 N Using configuration directory =
> /home/tv/.mythtv
> 2019-12-29 18:02:24.021959 I Assumed character encoding: en_GB.UTF-8
> 2019-12-29 18:02:24.022298 N Empty LocalHostName.
> 2019-12-29 18:02:24.022304 I Using localhost value of sgrizzo
> 2019-12-29 18:02:24.022350 I Start up testing connections. DB localhost,
> BE , attempt 0, status dbAwake
> 2019-12-29 18:02:25.039701 N Setting QT default locale to en_US
> 2019-12-29 18:02:25.039709 I Current locale en_US
> 2019-12-29 18:02:25.039766 N Reading locale defaults from
> /usr/share/mythtv//locales/en_us.xml
> 2019-12-29 18:02:25.043599 I Loading en_gb translation for module
> mythfrontend
> 2019-12-29 18:02:25.044414 I Current MythTV Schema Version (DBSchemaVer):
> 1348
> 2019-12-29 18:02:25.046092 I MythCoreContext::ConnectCommandSocket():
> Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
> 2019-12-29 18:02:25.046909 I MythCoreContext::CheckProtoVersion(): Using
> protocol version 91 BuzzOff
> 2019-12-29 18:02:25.047055 I Opening blocking connection to master backend
> 2019-12-29 18:02:25.049521 I Starting process manager
> 2019-12-29 18:02:25.049530 I Starting process signal handler
> 2019-12-29 18:02:25.050315 I Starting IO manager (write)
> 2019-12-29 18:02:25.050524 I Starting IO manager (read)
> 2019-12-29 18:02:25.559565 W No explicit time zone found, guessing
> implicit UTC! Please consider enhancing the guide source to provide
> explicit UTC or local time instead.
> 2019-12-29 18:02:25.618284 N Unknown xmltv channel identifier: Channel -
> Skipping channel.
> 2019-12-29 18:02:25.618303 I Updated programs: 0 Unchanged programs: 0
> 2019-12-29 18:02:25.619910 I Adjusting program database end times.
> 2019-12-29 18:02:25.620058 I 0 replacements made
> 2019-12-29 18:02:25.620061 I Marking generic episodes.
> 2019-12-29 18:02:26.047229 I Found 0
> 2019-12-29 18:02:26.047235 I Extending non-unique programids with
> multiple parts.
> 2019-12-29 18:02:26.115452 I Found 0
> 2019-12-29 18:02:26.115458 I Fixing missing original airdates.
> 2019-12-29 18:02:26.381737 I Found 0 with programids
> 2019-12-29 18:02:26.558699 I Found 0 without programids
> 2019-12-29 18:02:26.558707 I Marking repeats.
> 2019-12-29 18:02:26.937490 I Found 0
> 2019-12-29 18:02:26.937497 I Unmarking new episode rebroadcast repeats.
> 2019-12-29 18:02:26.959418 I Found 0
> 2019-12-29 18:02:28.289978 I Marking episode first showings.
> 2019-12-29 18:02:32.714980 I Found 75686
> 2019-12-29 18:02:32.714987 I Marking episode last showings.
> 2019-12-29 18:02:37.053638 I Found 60974
> 2019-12-29 18:02:37.063622 I
> ===============================================================
> | Attempting to contact the master backend for rescheduling. |
> | If the master is not running, rescheduling will happen when |
> | the master backend is restarted. |
> ===============================================================
> 2019-12-29 18:02:37.064193 N mythfilldatabase run complete.
> 2019-12-29 18:02:37.064245 I Waiting for threads to exit.
>
>
> ...but at the end of that I did not find data for Channel 4 HD in the
> database. What I did was
>
> manage recordings / schedule recordings / search lists / channels /
> Channel 4 HD
>
> and it came up with just the current programme, nothing else.
>
> Interestingly, in the box with the names of the channels, it appeared as
> 21200 Channel 4 HD
>
> So I tried the whole rigmarole again but with that number in, as in
>
>
> ./cross-eit.py -o /tmp/export.xml "10211,21200 Channel 4 HD"
>
> mythfilldatabase --refresh-all --verbose xmltv --file --sourceid 1
> --xmlfile /tmp/export.xml
>
> but it still didn't do me any good.
> What am I missing?
>
>
> I vaguely remember the result being one hour offset, presumably it doesn't
>> handle the clocks changing correctly.
>>
>> This line may need attention
>>
>> date = dateobj # + datetime.timedelta(seconds=time.altzone)
>>
> Thanks. I' ll look into that once I manage to import some schedule data...
>
>
> _______________________________________________
> mythtv-users mailing listmythtv-users@mythtv.orghttp://lists.mythtv.org/mailman/listinfo/mythtv-usershttp://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
> There are more than one instance of Channel 4 due to the regional
> versions, you can look up yours on
>
>
> https://en.kingofsat.net/freqs.php?&pos=28.2E&standard=All&ordre=freq&filtre=Clear
>
> Did you follow this step as described in cross-eit
>
> If you want to import the EPG data from the xml file using
> mythfilldatabase, you must add the appropriate xmltvid for each channel you
> want to import EPG to in mythweb [2] as well as uncheck the useonairguide
> for these channels.
>
> Using the mythweb settings - TV - Channel Info
>
> Set the xmltvid to Channel 4 HD
>
>
>
>
> _______________________________________________
> 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 ]
Oh, and I pressed SEND too soon....

On Wed, 8 Sept 2021 at 12:11, nemo <myth797@gmail.com> wrote:

> Just to muddy the waters a bit, I did do some work a while ago to update
> the python script to use python3 and to use the services api. I also sorted
> out some of the problems with incorrect times and the like.
>
> I've put a copy here https://pastebin.com/0tQFPBRB
>

...because I also wanted to mention that I was not able to run that:

$ ./cross-eit-nemo.py --output export-nemo.xml 19211,"hd.channel4.com"

19211 hd.channel4.com


No matching channels found.



whereas the same parameters work for the other two versions of cross-eit,
so it's not that 19211 is not in the database or anything like that:


$ ./cross-eit-jsw21.py -o export-jsw21.xml 19211,"hd.channel4.com"

cross-eit v2.1


Processing channel number: 19211, XMLTV id: hd.channel4.com

Number of processed programs: 590


Writing XMLTV EPG information to file export-jsw21.xml





What else am I getting wrong here?



>
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
Is that channel set to be visible?

I think I found the API didn't return data if it wasn't, which is why I use
the +1 channel and timeshift it.

On Sun, 12 Sept 2021 at 21:22, UB40D via mythtv-users <
mythtv-users@mythtv.org> wrote:

> Oh, and I pressed SEND too soon....
>
> On Wed, 8 Sept 2021 at 12:11, nemo <myth797@gmail.com> wrote:
>
>> Just to muddy the waters a bit, I did do some work a while ago to update
>> the python script to use python3 and to use the services api. I also sorted
>> out some of the problems with incorrect times and the like.
>>
>> I've put a copy here https://pastebin.com/0tQFPBRB
>>
>
> ...because I also wanted to mention that I was not able to run that:
>
> $ ./cross-eit-nemo.py --output export-nemo.xml 19211,"hd.channel4.com"
>
> 19211 hd.channel4.com
>
>
> No matching channels found.
>
>
>
> whereas the same parameters work for the other two versions of cross-eit,
> so it's not that 19211 is not in the database or anything like that:
>
>
> $ ./cross-eit-jsw21.py -o export-jsw21.xml 19211,"hd.channel4.com"
>
> cross-eit v2.1
>
>
> Processing channel number: 19211, XMLTV id: hd.channel4.com
>
> Number of processed programs: 590
>
>
> Writing XMLTV EPG information to file export-jsw21.xml
>
>
>
>
>
> What else am I getting wrong here?
>
>
>
>> _______________________________________________
> 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 Mon, 13 Sept 2021 at 10:12, nemo <myth797@gmail.com> wrote:

> Is that channel set to be visible?
>

No: to reduce clutter in the scheduling screens I have laboriously made all
channels not visible except those few HD channels I might actually want to
record anything from. (This is one thing that needs to be redone when
rescanning, one reason why I don't like rescanning.)


>
> I think I found the API didn't return data if it wasn't, which is why I
> use the +1 channel and timeshift it.
>

Is it correct to infer that cross-eit-nemo would work if I made that 19211
channel visible? Let's try...
...yes! Thank you!

Might be worth improving the error message to something like "No matching
VISIBLE channels found".
Re: Fwd: Re: channel4 hd has no eit - cross-eit [ In reply to ]
Glad it worked for you and I've tweaked the error message in the pastebin
file.

There might be a flag somewhere to change the behaviour I guess, but for me
that's not for today!


On Mon, 13 Sept 2021 at 11:35, UB40D via mythtv-users <
mythtv-users@mythtv.org> wrote:

>
>
> On Mon, 13 Sept 2021 at 10:12, nemo <myth797@gmail.com> wrote:
>
>> Is that channel set to be visible?
>>
>
> No: to reduce clutter in the scheduling screens I have laboriously made
> all channels not visible except those few HD channels I might actually want
> to record anything from. (This is one thing that needs to be redone when
> rescanning, one reason why I don't like rescanning.)
>
>
>>
>> I think I found the API didn't return data if it wasn't, which is why I
>> use the +1 channel and timeshift it.
>>
>
> Is it correct to infer that cross-eit-nemo would work if I made that 19211
> channel visible? Let's try...
> ...yes! Thank you!
>
> Might be worth improving the error message to something like "No matching
> VISIBLE channels found".
> _______________________________________________
> 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
>

1 2  View All