[mythtv-users] Rehash of a recent "Feature request"

Buechler, Mark R Mark_R_Buechler at bausch.com
Mon Mar 8 10:50:39 EST 2004


An alternate method might be to "set visible = 0 where ..." but then you'd
have to fix the sql select in includes/channels.php for MythWeb to "where
visible = 1". I thought it might be better to set these channels invisible
instead of deleting them.

-----Original Message-----
From: Dan Davis [mailto:dandavis-web-myth at dandavis.com]
Sent: Sunday, March 07, 2004 9:26 PM
To: mythtv-users at mythtv.org
Subject: [mythtv-users] Rehash of a recent "Feature request"


Someone posted a script to remove "deleted" channels from the database.
The versions sent to the list relied on the user specifing the list of
channels to delete.

However, if you just setup Myth and didn't update your *.xmltv config file
before you ran mythfilldatabase file, it'll be more than a couple channels
being removed... after I went back and figured out which channels I didn't
want, I had some 500 channels to delete...

So, I updated the script to read from the *.xmltv file and delete from the
database all the channels prefixed with "not ". A quick and painless
change...

Replace:
---------------------------------------------------------
@delete_channels = (
351,
352,
353,
);
$mysqlcmd = 'mysql -N -umythtv -pmythtv mythconverg';
---------------------------------------------------------

With:
---------------------------------------------------------
$channellist = "/home/mythtv/.mythtv/Dish Network.xmltv";

open (CHANLIST, $channellist);
while ($entry = <CHANLIST>) {
        next if ($entry !~ /^not channel/);
        ($not,$chantext,$channel,$name) = split/\s/,$entry;
        push @delete_channels, $channel;
}
close (CHANLIST);

print "Deleting " . scalar(@delete_channels) . " channels...\n";

$mysqlcmd = 'mysql -N -umythtv -pmythtv mythconverg';
---------------------------------------------------------

Dan
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users




Bausch & Lomb
150 Years of Perfecting Vision, Enhancing Life (TM)






EMAIL DISCLAIMER 

Please Note: The information contained in this message may be privileged and
confidential, protected from disclosure, and/or intended only for the use of
the individual or entity named above. If the reader of this message is not
the intended recipient, or an employee or agent responsible for delivering
this message to the intended recipient, you are hereby notified that any
disclosure, distribution, copying or other dissemination of this
communication is strictly prohibited. If you received this communication in
error, please immediately reply to the sender, delete the message and
destroy all copies of it.

Thank You



More information about the mythtv-users mailing list