[mythtv-users] Sequence for deleting dropped channels?

Richard Freeman r-mythtv at thefreemanclan.net
Mon Sep 24 00:59:57 UTC 2007

Craig Huff wrote:
> As soon as
> the show I'm currently recording finishes, I will go into mythtv-setup and
> remove them from the DB as Mike "delete all capture cards and re-enter"
> Dean advised. ;-)

Is there anything wrong with just doing this?:

DELETE FROM `channel` USING `channel` LEFT JOIN `program` ON
`channel`.`chanid` = `program`.`chanid`  WHERE `program`.`chanid` IS NULL ;

This deletes any channels that do not have any associated programming.
Granted, you need to wait a little over two weeks after removing a
channel from your lineup before this will work, but it has the benefit
that you don't have to re-create all your capture cards.  And you don't
need to manually delete channels either.

What would be the downside of this approach, if any?

More information about the mythtv-users mailing list