[mythtvnz] Correcting Title:subtitle listing

Hadley Rich hads at nice.net.nz
Mon Dec 22 22:24:28 GMT 2008


On Monday 22 December 2008 21:46:15 Nick Rout wrote:
> I have a series of recordings of a programme called NZ Directs
> (generally short films made by film students). The EPG has listed them
> as having as title, eg, "NZ Directs: Wide Eyes". Listing as title =
> "NZ Direct" subtitle = "Wide Eyes" would have produced the correct
> result.
>
> I'd like to run a script over my database to correct this, ie in
> pseudo-code
>
> if title = "NZ Directs:*" then change record so title = "NZ Directs",
> subtitle = $The_bit_after_the_colon (without the leading space)

Something like this SQL should do it;

UPDATE recorded SET subtitle = SUBSTRING(title, 13), title = 
SUBSTRING_INDEX(title, ":", 1) WHERE title LIKE "NZ Directs: %";

I haven't tested it on a real database so you might want to make sure you have 
an up to date backup :)

> Hads, this might be a candidate for epgsnoop to fix in the listings :)

I forgot we don't have a web service feed to subtitle replacements at the 
moment, only the title itself. It's possibly a good idea to set something up 
though.

hads
-- 
http://nicegear.co.nz
VoIP, DVB and other Linux compatible hardware.



More information about the mythtvnz mailing list