<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 01/01/2020 18:48, UB40D wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJ=aGtFffKz7rmrkdfegA8UQ-u7Fr=g=4YXCFp3ZS6PD_dragA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hooray! John, you' re officially my hero.<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 31 Dec 2019 at
12:13, John <<a href="mailto:jksjdevelop@gmail.com"
moz-do-not-send="true">jksjdevelop@gmail.com</a>>
wrote:<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>
<p>UPDATE channel SET channum=104, recpriority=2,
visible=1, xmltvid="<a href="http://hd.channel4.com"
target="_blank" moz-do-not-send="true">hd.channel4.com</a>",
icon="Channel 4 HD.jpg" WHERE sourceid="1" AND
serviceid="21200";</p>
</div>
</blockquote>
<div>I added the xmltvid using a statement similar to the
above. More specifically (for my own future reference)</div>
<div><br>
</div>
<div>mysql -u tv -p mythconverg<br>
</div>
<div><br>
</div>
<div>MariaDB [mythconverg]> select channum, visible,
callsign, name, icon, sourceid, serviceid, xmltvid,
recpriority from channel where name="Channel 4 HD";<br>
+---------+---------+--------------+--------------+------+----------+-----------+---------+-------------+<br>
| channum | visible | callsign | name | icon |
sourceid | serviceid | xmltvid | recpriority |<br>
+---------+---------+--------------+--------------+------+----------+-----------+---------+-------------+<br>
| 21200 | 1 | Channel 4 HD | Channel 4 HD | |
1 | 21200 | | 0 |<br>
+---------+---------+--------------+--------------+------+----------+-----------+---------+-------------+<br>
1 row in set (0.00 sec)<br>
</div>
<div> MariaDB [mythconverg]> update channel set xmltvid="<a
href="http://hd.channel4.com" moz-do-not-send="true">hd.channel4.com</a>"
where sourceid="1" and serviceid="21200";<br>
Query OK, 0 rows affected (0.00 sec)<br>
Rows matched: 1 Changed: 0 Warnings: 0<br>
<br>
MariaDB [mythconverg]> select channum, visible, callsign,
name, icon, sourceid, serviceid, xmltvid, recpriority from
channel where name="Channel 4 HD";<br>
+---------+---------+--------------+--------------+------+----------+-----------+-----------------+-------------+<br>
| channum | visible | callsign | name | icon |
sourceid | serviceid | xmltvid | recpriority |<br>
+---------+---------+--------------+--------------+------+----------+-----------+-----------------+-------------+<br>
| 21200 | 1 | Channel 4 HD | Channel 4 HD | |
1 | 21200 | <a href="http://hd.channel4.com"
moz-do-not-send="true">hd.channel4.com</a> | 0 |<br>
+---------+---------+--------------+--------------+------+----------+-----------+-----------------+-------------+<br>
1 row in set (0.00 sec)<br>
<br>
<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>Also see <a
href="https://www.mythtv.org/wiki/Database_editing_script"
target="_blank" moz-do-not-send="true">https://www.mythtv.org/wiki/Database_editing_script</a><br>
</p>
<p>I think there are some scripts around that avoid the
need to using SQL. A list of required channels is put in
a file and the utility interfaces with the database,
can't remember the name at the moment.<br>
</p>
<p>Here is a log from a successful run of
mythfilldatabase.</p>
<p>/home/tv/cross-eit.py 20104,"<a
href="http://hd.channel4.com" target="_blank"
moz-do-not-send="true">hd.channel4.com</a>" --the
20104 in this case is Channel 4 HD from freeview -
change to Freesat Channel4<br>
</p>
</div>
</blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<p> /usr/local/bin/mythfilldatabase --refresh-all
--verbose xmltv --file --sourceid 1 --xmlfile output.xml</p>
</div>
</blockquote>
<div><br>
</div>
<div>Here what I did was</div>
<div> ./cross-eit.py -o /tmp/export.xml 10211,"<a
href="http://hd.channel4.com" moz-do-not-send="true">hd.channel4.com</a>"
<br>
</div>
<div> mythfilldatabase --refresh-all --verbose xmltv --file
--sourceid 1 --xmlfile /tmp/export.xml <br>
</div>
<div><br>
</div>
<div>and for the first time the log did show things being
imported, as did yours!</div>
<div><br>
</div>
<div>Then I went into the Mythtv interface and confirmed that
"schedule recordings" could see programme data for Channel 4
HD, and allowed me to schedule a future recording.</div>
<div><br>
</div>
<div>So I'm basically all sorted, except I now have to script
the cross-eit and mythfilldatabase steps and put them into a
daily cron.</div>
<div><br>
</div>
<div>Once again thank you very much and happy new year!<br>
</div>
</div>
</div>
</blockquote>
<p>Great. I am interested to know whether you had to edit
cross-eit.py .</p>
<p>Unless I do the following the times are one hour out.<br>
- date = dateobj + datetime.timedelta(seconds=time.altzone)<br>
+ date = dateobj # + datetime.timedelta(seconds=time.altzone)<br>
return date.strftime("%Y%m%d%H%M%S")<br>
Thinking about it, the issue may occur only in BST - watch out
for the clocks changing.<br>
</p>
</body>
</html>