Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Mythtvnz

Correcting Title:subtitle listing

 

 

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded


nick.rout at gmail

Dec 22, 2008, 12:46 AM

Post #1 of 4 (871 views)
Permalink
Correcting Title:subtitle listing

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)

However I have neither script-fu nor mysql-fu and throw it open to the
audience. I am language agnostic, as long as your solution doesn't
involve installing gigabytes of some obscure language. i.e bash, perl,
python or ruby solutions would be preferred.

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

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


hads at nice

Dec 22, 2008, 3:16 AM

Post #2 of 4 (831 views)
Permalink
Re: Correcting Title:subtitle listing [In reply to]

On Monday 22 December 2008 21:46:15 Nick Rout wrote:
> Hads, this might be a candidate for epgsnoop to fix in the listings :)

Surely is, I'll take a look tomorrow.

hads
--
http://nicegear.co.nz
New Zealands Open Source Hardware Supplier

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


hads at nice

Dec 22, 2008, 2:24 PM

Post #3 of 4 (812 views)
Permalink
Re: Correcting Title:subtitle listing [In reply to]

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.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


nick.rout at gmail

Dec 22, 2008, 2:31 PM

Post #4 of 4 (818 views)
Permalink
Re: Correcting Title:subtitle listing [In reply to]

On Tue, Dec 23, 2008 at 11:24 AM, Hadley Rich <hads [at] nice> wrote:
> 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 :)

Cheers, I'll gove it a try :)

>
>> 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.
>

Not quite sure what you mean by "we don't have a web service feed to
subtitle replacements". However this disease affects quite a few
programmes. e.g. Artsville (I think). Very annoying.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.