[mythtv-users] Cleaning up the channels DB

Eyal Lebedinsky eyal at eyal.emu.id.au
Sat Mar 12 07:02:39 UTC 2005


David Whyte wrote:
> In my upgrade to 0.17 I really screwed things up!  In the end I delted
> the channels and set them up again, but not in the exact same way.
> 
> Now, I am trying to add ABC2 (a new aussie channel) but it is picking
> up the data for a channel which I cannot tune (SBS) and so generally
> hide.
[trimmed]

I have the same problem. Having upgraded 0.16 - 0.17 I ended up with
different 'chanid's. I cleaned everything up but after mythfilldatabase
I get 5 new analog channels added. I have no idea why, I now run the
following script after mythfilldatabase (the 'where' rule suits me,
you will adjust it for what you need):

use mythconverg;

delete from channel                    where chanid > 1004 and chanid < 2000;
delete from conflictresolutionoverride where chanid > 1004 and chanid < 2000;
delete from credits                    where chanid > 1004 and chanid < 2000;
delete from dvb_channel                where chanid > 1004 and chanid < 2000;
delete from dvb_pids                   where chanid > 1004 and chanid < 2000;
delete from favorites                  where chanid > 1004 and chanid < 2000;
delete from jobqueue                   where chanid > 1004 and chanid < 2000;
delete from oldrecorded                where chanid > 1004 and chanid < 2000;
delete from program                    where chanid > 1004 and chanid < 2000;
delete from programgenres              where chanid > 1004 and chanid < 2000;
delete from programrating              where chanid > 1004 and chanid < 2000;
delete from record                     where chanid > 1004 and chanid < 2000;
delete from recorded                   where chanid > 1004 and chanid < 2000;
delete from recordedmarkup             where chanid > 1004 and chanid < 2000;
delete from recordmatch                where chanid > 1004 and chanid < 2000;
delete from recordoverride             where chanid > 1004 and chanid < 2000;

I need to restart the backend to force it to see the changes.

I have chanid 1000-1004 (analog) and 2000-2014 (digital) as valid ones, and
1005-1009 added uninvited. My theory is that somehow new channels are added
when something fails to match the defined channels. Hope someone will tell
what it is.

Maybe adding the above cleanup script will help you too.

-- 
Eyal Lebedinsky (eyal at eyal.emu.id.au) <http://samba.org/eyal/>
	attach .zip as .dat


More information about the mythtv-users mailing list