[mythtv-users] Custom channel ordering ?

Duncan Brown mythtv at duncb.co.uk
Sat Jan 3 10:29:24 UTC 2009


Simon Hobson wrote:
> Duncan Brown wrote:
>
>   
>> I'd tell you how but my sql-fu is poor, and its something I've been
>> wanting to do myself for a long time
>>     
>
> OK, I've written a script to do it :
>
>   
>> #!/bin/bash
>>
>> # Set MythTV channel numbers
>>
>> . ~/.mythtv/mysql.txt
>>
>> echo '
>>   update channel set visible=0 ;
>>   update channel set visible=1,channum=1 where callsign="BBC ONE" ;
>>   update channel set visible=1,channum=2 where callsign="BBC TWO" ;
>>   update channel set visible=1,channum=3 where callsign="BBC THREE" ;
>>   update channel set visible=1,channum=4 where callsign="BBC FOUR" ;
>>   update channel set visible=1,channum=5 where callsign="ITV1" ;
>>   update channel set visible=1,channum=6 where callsign="ITV2" ;
>>   update channel set visible=1,channum=7 where callsign="ITV2 +1" ;
>>   update channel set visible=1,channum=8 where callsign="ITV3" ;
>>   update channel set visible=1,channum=9 where callsign="ITV4" ;
>> ' | mysql --database=${DBName} --user=${DBUserName} --password=${DBPassword}
>>     
>
> Neatly makes all the stuff I'm not bothered about invisible, then 
> sets the channel numbers for the stuff I do want (I've trimmed a few 
> lines for brevity). Uses the existing config file for database access 
> details.
>
>
>   
Thats great, thanks

Dunc


More information about the mythtv-users mailing list