[mythtv-users] mythfilldatabase channel updates
mike at dividia.net
Thu Jun 19 19:40:12 UTC 2008
Jan Ceuleers wrote:
> Mike LaPlante wrote:
>> I just updated my SchedulesDirect to remove all the useless channels I
>> don't watch. I know if I wait 2 weeks or so my guide should drop those
>> channels, but is there a way to force that?
>> I tried --do-channel-updates, didn't seem to help. Doing this remotely
>> over ssh so I've only attempted command line solutions.
>> Do I need to get into mythtv-setup and remove/recreate my cards,
>> sources, and inputs?
> I have a similar issue (which I've solved; see below). I think my
> situation is similar to yours, so perhaps you can come up with a similar
> solution as well.
> I don't use SchedulesDirect, but instead I download an xml file on a
> daily basis that a kind soul puts together using a number of web
> scrapers. The problem is that this xml file contains a number of
> channels that I don't actually receive on any of my tuners. When I
> import the xml file using mythfilldatabase, it creates entries for those
> I wanted to get rid of the phantom channels, so I went and looked for
> what sets them apart from the "legitimate" channels, and I came up with
> the following:
> delete from channel where isnull(freqid) and char_length(channum)=0;
> Having got rid of the channels, I also needed to get rid of any programs
> that mythfilldatabase had imported for those channels:
> delete from program where chanid not in (select chanid from channel);
> The nightly script that does all of this looks like this:
> cd ~mythtv
> wget http://www.mythportal.be/sites/mythportal.be/files/guide.xml.gz
> gunzip -f guide.xml.gz
> sed -ie 's/"ketnet"/"ketnet\/canvas"/g' guide.xml
> sed -ie 's/"canvas"/"ketnet\/canvas"/g' guide.xml
> mythfilldatabase --file 1 guide.xml
> mythfilldatabase --file 2 guide.xml
> . /etc/mythtv/mysql.txt
> mysql -h via.xperim.be -u $DBUserName --password=$DBPassword $DBName <
> mythbackend --resched
> where removePhantomChannelsAndPrograms.sql contains the above two SQL
> statements followed by quit.
> Please don't just adopt the above without checking that the delete
> statements don't remove any of your legitimate channels!!
> HTH, Jan
Well, I was just getting rid of the Spanish and home shopping channels. >.<
Brad's method worked fine. I just used mythweb to delete them all. I
suppose I could have done that instead of editing my SchedulesDirect
line up, but I'm hoping that getting rid of them on the SD site might
speed things up.
You'd think the less channels it has to download, the less stress it
puts on SD servers, not to mention faster DB searches, and faster guide
More information about the mythtv-users