[mythtv-users] Fwd: Fwd: Re: channel4 hd has no eit - cross-eit

UB40D ub40dd at googlemail.com
Mon Sep 6 06:01:01 UTC 2021


On Sun, 5 Sept 2021 at 11:10, John <jksjdevelop at gmail.com> wrote:

> I use 65692 which does work but the number may differ for you, test the SD
> channel you pick as source for the EIT of the HD channel.
>
How can I tell which one it is? I see no clue from the query below as to
which of them is being used for EIT.

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

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

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

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

|      9211 |  10211 | 9211    |        1 | Channel 4    | 2021-04-13
22:25:17 |                 |

|      8311 |   9311 | 8311    |        1 | Channel 4+1  | 2021-04-13
22:25:17 |                 |

|      8316 |   9316 | 8316    |        1 | Channel 4+1  | 2021-04-13
22:25:17 |                 |

|      8320 |   9320 | 8320    |        1 | Channel 4    | 2021-04-13
22:25:17 |                 |

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

|      9211 |  19211 | 9211    |        1 | Channel 4    | NULL
    |                 |

|      9212 |  19212 | 9212    |        1 | Channel 4    | NULL
    |                 |

|      9213 |  19213 | 9213    |        1 | Channel 4    | NULL
    |                 |

|      9214 |  19214 | 9214    |        1 | Channel 4    | NULL
    |                 |

|      9216 |  19216 | 9216    |        1 | Channel 4    | NULL
    |                 |

|      8311 |  18311 | 8311    |        1 | Channel 4+1  | NULL
    |                 |

|      8312 |  18312 | 8312    |        1 | Channel 4+1  | NULL
    |                 |

|      8314 |  18314 | 8314    |        1 | Channel 4+1  | NULL
    |                 |

|      8316 |  18316 | 8316    |        1 | Channel 4+1  | NULL
    |                 |

|      8320 |  18320 | 8320    |        1 | Channel 4    | NULL
    |                 |

|     21200 |  31200 | 21200   |        1 | Channel 4 HD | NULL
    | hd.channel4.com |

|     22620 |  32620 | 22620   |        1 | Channel 44   | NULL
    |                 |

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

17 rows in set (0.01 sec)


I also tried looking at all the existing column headings in "channel" (with
"select * from channel") but none suggested that a channel was being used
for EIT. Obviously that info must be in some other table. Would you know
which?



> I am testing the following to cope with the clocks changing.
>
> I know its cringe worthy but might work, the two versions of crosseit have
> the single line change.
>
>  # Winter --
>     # date = dateobj # + datetime.timedelta(seconds=time.altzone)
>     # Summer
>     date = dateobj + datetime.timedelta(seconds=time.altzone)
>
>  #!/bin/bash
> if date +%Z | grep -e BST; then
>     echo "Summer"
>     ./cross-eit3S.py 65692,"hd.channel4.com"
> else
>     echo "Winter"
>     ./cross-eit3W.py 65692,"hd.channel4.com"
> fi
> /usr/local/bin/mythfilldatabase --refresh-all --verbose xmltv --file
> --sourceid 1 --xmlfile output.xml
>

You are right that the mix of bash and python is somewhat cringe-worthy: it
would be neater to do the change in python rather than calling two versions
of the script.

However a more serious problem is that this approach changes the time zone
for all the dates in the EIT for that week. In steady state that's likely
to be fine, but in those two transition weeks of the year, when one batch
of listings has some listings before the change and some after the change,
some of those listings will be assigned the wrong offset.

The correct but slightly more laborious fix, in my opinion, would be to
apply the offset to each individual programme listing in the batch, thus
possibly having programmes in the same batch with different UTC offsets,
which will happen during those transition weeks. I'll code it up in python
when I have a moment, starting from the code that Stephen posted yesterday
that got rid of the absurdly long lines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20210906/6ebb8e33/attachment.htm>


More information about the mythtv-users mailing list