[mythtv-users] Custom channel ordering ?
Simon Hobson
linux at thehobsons.co.uk
Fri Jan 2 19:26:28 UTC 2009
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.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the mythtv-users
mailing list