[mythtv-users] Willing to pay for better listings?? - US

Chris Delis cedelis at uillinois.edu
Thu Feb 5 11:48:58 EST 2004


On Thu, Feb 05, 2004 at 11:23:16AM -0500, Andrew Dodd wrote:
> Quoting Ethan McDonald <emcdonald at ionstorm.com>:
> 
> > I personally would not either.
> > 
> > In fact one feature Myth's TV listings needs is a exception list.
> > A lot of the channels downloaded for MythTV are not even on my DirecTV list
> > of channels and others I could just as really do with out like all the
> > music
> > channels.
> > 
> > I would be nice if I could go through the entire list and set my
> > preferences
> > as to what I do don't want to browse.
> > Also I should be able to set an option so that MythTV will only bother
> > filling the database with the channels I selected as viewable.
> > Perhaps this could be added to the Mythtvsetup.
> Edit ~/.xmltv/tv_grab_na.conf (or whatever tv_grab you're using) and replace
> lines like this:
> channel: 13 WNET
> with
> not channel: 13 WNET
> 
> You'll have to manually go into the database and delete the channels you've told
> xmltv to stop recording though, otherwise you'll have a bunch of channels with
> blank program data.


I wrote a script that deletes the channel information from the database.  It works
for me, anyway.  I'll include it in case you may find it useful.

-------------- next part --------------
#!/usr/bin/perl

@delete_channels = (
631,
);
$mysqlcmd = 'mysql -N -umythtv -pmythtv mythconverg';

$sql = "select chanid from channel where channum in (";
$sql .= join (',', @delete_channels);
$sql .= ");";
$res = `${mysqlcmd}<<EOF
$sql
EOF`;

(@ids) = split (/^/, $res);
$sql = '';
foreach $id (@ids) {
   chomp ($id);
   $sql .= "delete from channel where chanid = ${id};\n";
   $sql .= "delete from program where chanid = ${id};\n";
}

$res = `${mysqlcmd}<<EOF
${sql}
EOF`;

print $res;


More information about the mythtv-users mailing list