[mythtvnz] Is anyone still using MythTV v30 or below?

Jonathan Hoskin jonathan.hoskin at gmail.com
Sun May 9 20:34:02 BST 2021


On Sun, 9 May 2021 at 11:16 PM, Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:

> I am working on the Python 3 version of mhegepgsnoop, and I have come
> up with a small problem with the channel table.  In v31, the channel
> table has a new column "deleted".  When the "deleted" value for a
> channel is not NULL, it is a timestamp of when the channel was deleted
> from your list of channels by a channel scan.  The channel remains in
> the database, but marked as deleted, until there are no more
> recordings in the recordings table that match that channel.  This
> allows the recordings matching a deleted channel to be displayed
> properly with their correct channel data, even after the channel is
> long gone.
>
> When mhegepgsnoop looks up the database to get the channels it is
> trying to match to, it currently does not know about the "deleted"
> column and will therefore try to match MHEG-5 EPG channel names to
> channels that no longer exist.  If the name for a deleted channel
> matches better than the name of an existing channel, it will mismatch
> the EPG data to the deleted channel.  So what I would like to be able
> to do is to get mhegepgsnoop to ignore all channels it reads from the
> database which have a non-NULL "deleted" value.  But if there are
> still people out there using mhegepgsnoop who have not yet upgraded to
> MythTV v31 or above, I will need to do some extra code that checks to
> see if the "deleted" column even exists, before checking its value.
> This is likely a nasty hack type bit of code, which I would prefer to
> avoid if it is not needed.
>
> So is there anyone out there who is running mhegepgsnoop.py and has
> yet to upgrade to v31 or later?
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.ourshack.com
> https://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>
Could you just guard the SQL queries in the code to check for the presence
of the new column, and then support both schema versions?

A-la:
https://stackoverflow.com/a/19377091

Cheers
Jono
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/mythtvnz/attachments/20210510/0a29ff76/attachment.html>


More information about the mythtvnz mailing list