[mythtvnz] Channel id to name tables: Where are they?

Steve Hodge stevehodge at gmail.com
Mon Oct 22 05:41:07 BST 2012


On Mon, Oct 22, 2012 at 12:30 PM, Worik Stanton <worik.stanton at gmail.com>wrote:

> How do I query my database to get a channel ID to english language
> description?


The issue is likely to be an incorrect PID (DVB) or freqid (analogue) for a
particular channel. If the problem is intermittent and you have multiple
sources then the PID may be wrong for just one copy of the channel. What
you need to do is to verify that callsign, name, xmltvid, and tuning info
(serviceid for DVB, freqid for analogue) are in sync for each channel. The
query is "select chanid, callsign, name, xmltvid, freqid, serviceid from
channel;". To verify the serviceid you'll need to either scan the
multiplexes yourself (e.g. dvbscan), or find the info on the net somewhere
(e.g. lyngsat for satellite).

If you check all of that and it's ok then check the guide data. The table
is "program", it links to "channel" on "chanid". E.g. "select chanid,
starttime, endtime, title from program where starttime between '2012-10-01'
and '2012-10-02' and chanid = 1052;"


>  I am wondering if in all my updating channels I corrupted
> those tables.
>

It's possible, even likely. It's why the developers recommend that users
don't update their databases directly.


> A question for an FAQ (if one eventuates) is "Where can I see a
> structure of the MythTV DBs?"  Answering that would be sufficient for me.
>

Get a better query tool. Any decent one will let you browse the database
structure. Personally I use SQLyog from my Windows desktop. I'm sure there
are plenty of Linux options too.


> PS:  The long story is looking at the backend logs I see a recording of
> BBC news that was broadcast on TV1 at 4am but recorded Maori TV...
>
> 2012-10-22 04:00:03.264 Started recording: "BBC World News": channel
> 1052 on cardid 1, sourceid 1
>
> TV1 recordings are on channel 1001 and Maori TV on 1005.
>

So what is chanid 1052? Show us the output of this:
select chanid, callsign, name, xmltvid, freqid, serviceid from channel
where chanid in (1001,1005,1052);

If 1052 is not a channel you are using you should set visible = 0 in the
channel table for it.

Cheers,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/mythtvnz/attachments/20121022/e677350c/attachment-0001.html>


More information about the mythtvnz mailing list