<div dir="ltr">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.<br><br>I've put a copy here <a href="https://pastebin.com/0tQFPBRB">https://pastebin.com/0tQFPBRB</a><br><br>It'll tell you what it does:<br>$ python3 cross-eit2.py -h<br>usage: cross-eit2.py [-h] [--debug] [--digest <user:pass>] [--forcehd]<br> [--host <hostname>] [--output <file>] [--port <port>]<br> [--shift <time shift>] [--version]<br> chanidN,xmlidN [chanidN,xmlidN ...]<br><br>Fetch EPG data for specified channels from a mythtv database and export this<br>data to an XMLTV formatted XML file<br><br>positional arguments:<br> chanidN,xmlidN list of chanid & xmlid pairs e.g. chanid1,xmlid1<br> chanid2,xmlid2 chanidN,xmlidN<br><br>optional arguments:<br> -h, --help show this help message and exit<br> --debug turn on debug messages (False)<br> --digest <user:pass> digest username:password<br> --forcehd forces all output programmes to be flagged as HD<br> (False)<br> --host <hostname> backend hostname (localhost)<br> --output <file> output XML file name (./output.xml)<br> --port <port> port number of the Services API (6544)<br> --shift <time shift> time in minutes to move programme data (0)<br> --version show program's version number and exit<br><br>Default values are in ()s<br><br><br>So for channel4HD I take the data from chaniid 18312 which is my Channel4+1 and invoke it like this:<br>/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<br><br>and then I run mythfilldatabase like this:<br>/usr/bin/mythfilldatabase -v --loglevel debug --file --sourceid 1 --xmlfile /tmp/export.xml > /home/mythtv/scripts/mythfilldatabase.out<br><br><br>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...<br><br>Cheers</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 30 Dec 2019 at 12:40, John <<a href="mailto:jksjdevelop@gmail.com">jksjdevelop@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>On 29/12/2019 18:10, UB40D wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, 29 Dec 2019 at
16:37, John <<a href="mailto:jksjdevelop@gmail.com" target="_blank">jksjdevelop@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p> </p>
<div>On Freesat Channel 4 HD does indeed have no EIT </div>
</div>
</blockquote>
<div><br>
</div>
<div>Argh! Weird and unexpected, but this explains things!<br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>
<p>One solution is to copy the EIT from channel 4 using
<a href="https://www.mythtv.org/wiki/Cross-eit.py" target="_blank">https://www.mythtv.org/wiki/Cross-eit.py</a></p>
<p>I run this once a day using cron<br>
</p>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Thanks very much for this tip.</div>
<div><br>
</div>
<div>I have managed to extract a channel number for channel 4
as follows:</div>
<div><br>
</div>
<div>mysql -u tv -p mythconverg -e "SELECT chanid,callsign
from channel WHERE callsign='Channel 4'"<br>
Enter password: <br>
+--------+-----------+<br>
| chanid | callsign |<br>
+--------+-----------+<br>
| 10211 | Channel 4 |<br>
| 10212 | Channel 4 |<br>
| 10213 | Channel 4 |<br>
| 10214 | Channel 4 |<br>
| 10216 | Channel 4 |<br>
| 9320 | Channel 4 |<br>
+--------+-----------+</div>
<div><br>
</div>
<div>(I have no idea why I have so many; this happens with
several other channels too, even when I restart from a clean
scan)</div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div> ./cross-eit.py -o /tmp/export.xml "10211,Channel 4 HD" <br>
</div>
<div><br>
</div>
<div>...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</div>
<div><br>
</div>
<div>mythfilldatabase --refresh-all --verbose xmltv --file
--sourceid 1 --xmlfile /tmp/export.xml <br>
****************************************************<br>
WARNING: --refresh-all has been deprecated<br>
use --refresh instead<br>
****************************************************<br>
<br>
2019-12-29 18:02:24.010591 C mythfilldatabase version:
fixes/29 [v29.1-40-g951f1fe] <a href="http://www.mythtv.org" target="_blank">www.mythtv.org</a><br>
2019-12-29 18:02:24.010611 C Qt version: compile: 5.5.1,
runtime: 5.9.5<br>
2019-12-29 18:02:24.010615 N Enabled verbose msgs: general
xmltv<br>
2019-12-29 18:02:24.010627 N Setting Log Level to LOG_INFO<br>
2019-12-29 18:02:24.021071 I Bypassing grabbers, reading
directly from file<br>
2019-12-29 18:02:24.021656 I Setup Interrupt handler<br>
2019-12-29 18:02:24.021671 I Setup Terminated handler<br>
2019-12-29 18:02:24.021679 I Setup Segmentation fault
handler<br>
2019-12-29 18:02:24.021689 I Setup Aborted handler<br>
2019-12-29 18:02:24.021713 I Setup Bus error handler<br>
2019-12-29 18:02:24.021723 I Setup Floating point exception
handler<br>
2019-12-29 18:02:24.021731 I Setup Illegal instruction
handler<br>
2019-12-29 18:02:24.021743 I Setup Real-time signal 0
handler<br>
2019-12-29 18:02:24.021754 I Setup Hangup handler<br>
2019-12-29 18:02:24.021801 I Added logging to the console<br>
2019-12-29 18:02:24.021877 N Using runtime prefix = /usr<br>
2019-12-29 18:02:24.021881 N Using configuration directory
= /home/tv/.mythtv<br>
2019-12-29 18:02:24.021959 I Assumed character encoding:
en_GB.UTF-8<br>
2019-12-29 18:02:24.022298 N Empty LocalHostName.<br>
2019-12-29 18:02:24.022304 I Using localhost value of
sgrizzo<br>
2019-12-29 18:02:24.022350 I Start up testing connections.
DB localhost, BE , attempt 0, status dbAwake<br>
2019-12-29 18:02:25.039701 N Setting QT default locale to
en_US<br>
2019-12-29 18:02:25.039709 I Current locale en_US<br>
2019-12-29 18:02:25.039766 N Reading locale defaults from
/usr/share/mythtv//locales/en_us.xml<br>
2019-12-29 18:02:25.043599 I Loading en_gb translation for
module mythfrontend<br>
2019-12-29 18:02:25.044414 I Current MythTV Schema Version
(DBSchemaVer): 1348<br>
2019-12-29 18:02:25.046092 I
MythCoreContext::ConnectCommandSocket(): Connecting to
backend server: <a href="http://127.0.0.1:6543" target="_blank">127.0.0.1:6543</a> (try 1 of 1)<br>
2019-12-29 18:02:25.046909 I
MythCoreContext::CheckProtoVersion(): Using protocol
version 91 BuzzOff<br>
2019-12-29 18:02:25.047055 I Opening blocking connection to
master backend<br>
2019-12-29 18:02:25.049521 I Starting process manager<br>
2019-12-29 18:02:25.049530 I Starting process signal
handler<br>
2019-12-29 18:02:25.050315 I Starting IO manager (write)<br>
2019-12-29 18:02:25.050524 I Starting IO manager (read)<br>
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.<br>
2019-12-29 18:02:25.618284 N Unknown xmltv channel
identifier: Channel - Skipping channel.<br>
2019-12-29 18:02:25.618303 I Updated programs: 0 Unchanged
programs: 0<br>
2019-12-29 18:02:25.619910 I Adjusting program database end
times.<br>
2019-12-29 18:02:25.620058 I 0 replacements made<br>
2019-12-29 18:02:25.620061 I Marking generic episodes.<br>
2019-12-29 18:02:26.047229 I Found 0<br>
2019-12-29 18:02:26.047235 I Extending non-unique
programids with multiple parts.<br>
2019-12-29 18:02:26.115452 I Found 0<br>
2019-12-29 18:02:26.115458 I Fixing missing original
airdates.<br>
2019-12-29 18:02:26.381737 I Found 0 with programids<br>
2019-12-29 18:02:26.558699 I Found 0 without programids<br>
2019-12-29 18:02:26.558707 I Marking repeats.<br>
2019-12-29 18:02:26.937490 I Found 0<br>
2019-12-29 18:02:26.937497 I Unmarking new episode
rebroadcast repeats.<br>
2019-12-29 18:02:26.959418 I Found 0<br>
2019-12-29 18:02:28.289978 I Marking episode first
showings.<br>
2019-12-29 18:02:32.714980 I Found 75686<br>
2019-12-29 18:02:32.714987 I Marking episode last showings.<br>
2019-12-29 18:02:37.053638 I Found 60974<br>
2019-12-29 18:02:37.063622 I <br>
===============================================================<br>
| Attempting to contact the master backend for rescheduling.
|<br>
| If the master is not running, rescheduling will happen
when |<br>
| the master backend is restarted.
|<br>
===============================================================<br>
2019-12-29 18:02:37.064193 N mythfilldatabase run complete.<br>
2019-12-29 18:02:37.064245 I Waiting for threads to exit.</div>
<div><br>
</div>
<div><br>
</div>
<div>...but at the end of that I did not find data for Channel
4 HD in the database. What I did was</div>
<div><br>
</div>
<div>manage recordings / schedule recordings / search lists /
channels / Channel 4 HD</div>
<div><br>
</div>
<div>and it came up with just the current programme, nothing
else.</div>
<div><br>
</div>
<div>Interestingly, in the box with the names of the channels,
it appeared as</div>
<div>21200 Channel 4 HD</div>
<div><br>
</div>
<div>So I tried the whole rigmarole again but with that number
in, as in</div>
<div><br>
</div>
<div><br>
</div>
<div> ./cross-eit.py -o /tmp/export.xml "10211,21200 Channel 4
HD" <br>
<br>
mythfilldatabase --refresh-all --verbose xmltv --file
--sourceid 1 --xmlfile /tmp/export.xml <br>
</div>
<div><br>
</div>
<div>but it still didn't do me any good.</div>
<div>What am I missing?<br>
</div>
<div><br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>
<p> </p>
<p>I vaguely remember the result being one hour offset,
presumably it doesn't handle the clocks changing
correctly.</p>
<p>This line may need attention</p>
<p>date = dateobj # +
datetime.timedelta(seconds=time.altzone)<br>
</p>
</div>
</div>
</blockquote>
<div>Thanks. I' ll look into that once I manage to import some
schedule data...<br>
</div>
<div> </div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
mythtv-users mailing list
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a>
MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a>
</pre>
</blockquote>
<p>There are more than one instance of Channel 4 due to the regional
versions, you can look up yours on </p>
<p><a href="https://en.kingofsat.net/freqs.php?&pos=28.2E&standard=All&ordre=freq&filtre=Clear" target="_blank">https://en.kingofsat.net/freqs.php?&pos=28.2E&standard=All&ordre=freq&filtre=Clear</a></p>
<p>Did you follow this step as described in cross-eit</p>
<p>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. <br>
</p>
<p>Using the mythweb settings - TV - Channel Info <br>
</p>
<p>Set the xmltvid to Channel 4 HD</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div>