[mythtv-users] Modifying channels from database

Michael T. Dean mtdean at thirdcontact.com
Sun Apr 8 20:00:45 UTC 2007


On 04/08/2007 02:01 PM, Mattia Martinello wrote:
> In modifying a lot of channels in the same time it should better to 
> modify directly the database instead to use mythtv-setup.
> For example, to modify the channel number, can I simply modify the 
> "channum" field in the "channel" table of the database?
>   

You can, but...

I /highly/ recommend you take care when if you do so.  You're much 
better off using something like MythWeb's channel editor to change all 
the channel numbers in a single form and submit it once.  Even though 
that page explicitly says, "Please be warned that by altering this table 
without knowing what you are doing, you could seriously disrupt mythtv 
functionality," it's /much/ safer than editing the database directly.

> To remove one or more chanels, can I simply remove the related row from 
> the "channel" table of the database?
> Or I have to do something else?

They'll probably keep coming back every time you run mythfilldatabase.  
You should really remove them properly (remove from DataDirect 
lineup/XMLTV configuration, then use the mythtv-setup program to delete 
the channel).  If you don't, you'll leave garbage in your database 
that's likely to break MythTV (which is why MythTV has an interface for 
making these types of changes).


If you're making a significant number of changes***, you should use 
mythtv-setup's "Delete All" button to delete all video sources, then 
re-create video sources (after modifying your DataDirect/XMLTV 
configuration to remove the undesired channels), input connections, and 
channels.

Mike

***What is a "significant number?"  Well, if you make changes and things 
don't work properly, it's some number equal to or smaller than the 
number of changes you made.  In many cases, "Delete All" is faster 
because it works properly the first time.


More information about the mythtv-users mailing list