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

Worik Stanton worik.stanton at gmail.com
Tue Oct 23 03:36:50 BST 2012


> Good call, Steve.  There are two sources.  So now we need to see how
> the two sources are set up.  The sourceid field is used in only three
> tables: channel, videosource and dtv_multiplex.  So please post the
> results of these:
> 
> select * from videosource;
> select * from dtv_multiplex;

Attached.  That second one has a lot of columns.

> 
> I think this is all still the result of two scans, and that one source
> can be deleted, along with all the related channel records.

In mythtv speak what is a source?  Is it a tuner?  (That is what I
assumed as I have two tuners)

> 
> To safely delete one duplicate set of channel records, we also need to
> know where the chanid values in those records are being used, and
> whether they will then need to be changed from 1xxx to 3xxx and vice
> versus.  I did a dump of the database structure:
> 
>   mysqldump -d -u $DBUserName -p$DBPassword -h $DBHostName $DBName
>> mythconverg_schema.sql
> 
> and went searching with my editor to find all references to chanid. As
> it is the field used to tie together channels and everything else, I
> was not surprised to find lots of references to it.  Here is the list
> of tables it is used in:
> 
>   channel
>   channelgroup
>   credits
>   eit_cache
>   inuseprograms
>   jobqueue
>   oldrecorded
>   pidcache
>   program
>   programgenres
>   programrating
>   record
>   record_tmp
>   recorded
>   recordedcredits
>   recordedfile
>   recordedmarkup
>   recordedprogram
>   recordedrating
>   recordedseek
>   recordmatch
>   tvchain
> 
> So we need to be sure of whether either or both the 1xxx and 3xxx
> channels have been used in all those tables.  Some, like tvchain and
> pidcache, I would expect to be empty tables, but there will be lots of
> rows in most of them.
> 
> The results of this script (count_chanids.sh) should tell us where the
> 1xxx and 3xxx chanid values have been used:
> 
> #!/bin/bash

[snip]

Attached the output of that script too

cheers
Worik
__________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
> 


-- 
it does not matter                      I think that I shall never see
how much I dig and dig                    A billboard lovely as a tree
this hole just                      Indeed, unless the billboards fall
keeps getting deeper                      I'll never see a tree at all
-------------- next part --------------
select * from videosource;
+----------+------------+---------------+--------+-----------+----------+----------+--------+------------+------------+
| sourceid | name       | xmltvgrabber  | userid | freqtable | lineupid | password | useeit | configpath | dvb_nit_id |
+----------+------------+---------------+--------+-----------+----------+----------+--------+------------+------------+
|        1 | Nova-T     | tv_grab_nz-py |        | try-all   | NULL     | NULL     |      1 | NULL       |         -1 |
|        2 | TVStickOne | tv_grab_nz-py |        | default   | NULL     | NULL     |      0 | NULL       |         -1 |
|        3 | Pinnicle   | tv_grab_nz-py |        | default   | NULL     | NULL     |      1 | NULL       |         -1 |
+----------+------------+---------------+--------+-----------+----------+----------+--------+------------+------------+


select * from dtv_multiplex;
+---------+----------+-------------+-----------+-----------+-----------+------------+------+----------+------------+-----------+--------------+------\
-------------+----------------+---------+---------------+-----------+--------------+-----------+---------+------------+----------------+-------------\
--------+-------------------+
| mplexid | sourceid | transportid | networkid | frequency | inversion | symbolrate | fec  | polarity | modulation | bandwidth | lp_code_rate | trans\
mission_mode | guard_interval | visible | constellation | hierarchy | hp_code_rate | mod_sys   | rolloff | sistandard | serviceversion | updatetimest\
amp     | default_authority |
+---------+----------+-------------+-----------+-----------+-----------+------------+------+----------+------------+-----------+--------------+------\
-------------+----------------+---------+---------------+-----------+--------------+-----------+---------+------------+----------------+-------------\
--------+-------------------+
|       8 |        3 |          28 |      8746 | 578000000 | 0         |          0 | auto | v        | qam_64     | 8         | 3/4          | 8    \
             | 1/16           |       0 | qam_64        | n         | 3/4          | UNDEFINED | 0.35    | dvb        |             33 | 2012-10-15 1\
3:58:27 |                   |
|       7 |        3 |          32 |      8746 | 562000000 | 0         |          0 | auto | v        | qam_64     | 8         | 3/4          | 8    \
             | 1/16           |       0 | qam_64        | n         | 3/4          | UNDEFINED | 0.35    | dvb        |             33 | 2012-10-15 1\
3:58:27 |                   |
|       4 |        1 |          29 |      8746 | 562000000 | 0         |          0 | auto | v        | qam_64     | 8         | 3/4          | 8    \
             | 1/16           |       0 | qam_64        | n         | 3/4          | UNDEFINED | 0.35    | dvb        |             33 | 2012-01-24 2\
1:38:28 |                   |
|       5 |        1 |          28 |      8746 | 578000000 | 0         |          0 | auto | v        | qam_64     | 8         | 3/4          | 8    \
             | 1/16           |       0 | qam_64        | n         | 3/4          | UNDEFINED | 0.35    | dvb        |             33 | 2012-01-24 2\
1:38:28 |                   |
|       6 |        1 |          33 |      8746 | 594000000 | 0         |          0 | auto | v        | qam_64     | 8         | 3/4          | 8    \
             | 1/16           |       0 | qam_64        | n         | 3/4          | UNDEFINED | 0.35    | dvb        |             33 | 2012-01-24 2\
1:38:28 |                   |
|       9 |        3 |          33 |      8746 | 594000000 | 0         |          0 | auto | v        | qam_64     | 8         | 3/4          | 8    \
             | 1/16           |       0 | qam_64        | n         | 3/4          | UNDEFINED | 0.35    | dvb        |             33 | 2012-10-15 1\
3:58:27 |                   |
+---------+----------+-------------+-----------+-----------+-----------+------------+------+----------+------------+-----------+--------------+------\
-------------+----------------+---------+---------------+-----------+--------------+-----------+---------+------------+----------------+-------------\
--------+-------------------+
6 rows in set (0.02 sec)



-------------- next part --------------

channel
<1000    	0
1000-1999	36
2000-2999	0
3000-3999	28
>4000    	0

channelgroup
<1000    	0
1000-1999	0
2000-2999	0
3000-3999	0
>4000    	0

credits
<1000    	0
1000-1999	135
2000-2999	0
3000-3999	0
>4000    	0

eit_cache
<1000    	0
1000-1999	8092
2000-2999	0
3000-3999	7708
>4000    	0

inuseprograms
<1000    	0
1000-1999	3
2000-2999	0
3000-3999	0
>4000    	0

jobqueue
<1000    	0
1000-1999	54
2000-2999	0
3000-3999	16
>4000    	0

oldrecorded
<1000    	0
1000-1999	1543
2000-2999	0
3000-3999	27
>4000    	0

pidcache
<1000    	0
1000-1999	0
2000-2999	0
3000-3999	0
>4000    	0

program
<1000    	0
1000-1999	12477
2000-2999	0
3000-3999	7741
>4000    	0

programgenres
<1000    	0
1000-1999	0
2000-2999	0
3000-3999	0
>4000    	0

programrating
<1000    	0
1000-1999	2345
2000-2999	0
3000-3999	0
>4000    	0

record
<1000    	2
1000-1999	95
2000-2999	0
3000-3999	1
>4000    	0

record_tmp
<1000    	2
1000-1999	57
2000-2999	0
3000-3999	0
>4000    	0

recorded
<1000    	0
1000-1999	106
2000-2999	0
3000-3999	16
>4000    	0

recordedcredits
<1000    	0
1000-1999	0
2000-2999	0
3000-3999	0
>4000    	0

recordedfile
<1000    	0
1000-1999	0
2000-2999	0
3000-3999	0
>4000    	0

recordedmarkup
<1000    	0
1000-1999	622
2000-2999	0
3000-3999	65
>4000    	0

recordedprogram
<1000    	0
1000-1999	114
2000-2999	0
3000-3999	17
>4000    	0

recordedrating
<1000    	0
1000-1999	3
2000-2999	0
3000-3999	0
>4000    	0

recordedseek
<1000    	0
1000-1999	287045
2000-2999	0
3000-3999	49468
>4000    	0

recordmatch
<1000    	0
1000-1999	348
2000-2999	0
3000-3999	102
>4000    	0

tvchain
<1000    	0
1000-1999	0
2000-2999	0
3000-3999	0
>4000    	0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ourshack.com/pipermail/mythtvnz/attachments/20121023/d2d9422e/attachment.pgp>


More information about the mythtvnz mailing list