[mythtv-users] UK: tv_grab_uk_atlas.py not marking HD programs
Simon Hobson
linux at thehobsons.co.uk
Fri Oct 10 20:53:32 UTC 2014
mythtv at phipps-hutton.freeserve.co.uk wrote:
> # Mark programmes as HD if their channel is HD, the grabber cannot as the atlas database is per program not per channel.
> echo "update program set hdtv = 0;" \ mythql
> echo "select chanid from channel where callsign like '%HD';" \
> | mythql \
> | while read chanid
> do
> echo "update program set hdtv = 1 where chanid = $chanid;"
> done \
> | mythql
I think you could simplify that to just one SQL statement !
update program
set hdtv=1
where chanid in
(select chanid
from channel
where callsign like '%HD')
If I've got the syntax right (I'm a bit rusty these days and I learned on a different SQL dialect) then the bit in (...) is a subquery that returns a list of values; then the "in ( ... )" syntax does pretty much what it says, match any row that matches a value in the list.
More information about the mythtv-users
mailing list