birtles.org.uk logo

Insert HDTV tag based on channel name

Discussion of Version 3 and developing lua grabbers

Insert HDTV tag based on channel name

Postby AdeG43 » Sun Apr 10, 2011 4:55 pm

Hi, I've tried a few options and settled on the Radio Times guide into SageTV. I've got it working OK but the down side is the lack of the HDTV tag from the UK Radio Times info.

One thought I've had is to insert the tag on the fly if the channel name contains 'HD'. From what I can make out this would involve amending some code into the xmltv_parse file, probably at this point?

if DigiMiscFind(miscTag, "(High Definition)") then
if not prog.Video then
prog.Video = {}
end
prog.Video.Quality = "HDTV"
end

From my very limited knowledge of programming this might involve amending the first line above to check if 'HD' (in caps, no space between the H and the D) is contained in the name of the channel. eg Comedy Channel HD

Am I on the right track here and if so what would the code be that check to see 'if channel name contains HD'

many thanks - I've tried to take this as far as I can on my own but I'm stuck at the final hurdle.

Ade
AdeG43
 
Posts: 3
Joined: Sat Apr 09, 2011 8:59 pm

Re: Insert HDTV tag based on channel name

Postby alanbirtles » Thu Apr 14, 2011 7:48 am

for performing such modifications it is much better to create a post processor. look in prog_dets.lua for some examples
alanbirtles
Site Admin
 
Posts: 493
Joined: Mon Sep 06, 2004 4:44 pm

Re: Insert HDTV tag based on channel name

Postby AdeG43 » Fri Apr 15, 2011 9:10 pm

Thanks Alan, this is beyond me but if anyone ever takes it on I'd be grateful if they could share it.
thanks again
Ade
AdeG43
 
Posts: 3
Joined: Sat Apr 09, 2011 8:59 pm

Re: Insert HDTV tag based on channel name

Postby AdeG43 » Wed Apr 20, 2011 12:16 am

Thanks for the advice. I'm trying to alter the prog_details.lua and have been able to include an 'AddHD' option in the PrgDets post-processor settings menu.
I'm working on the script but am very stuck at this point.

if AddHD then
program.Video.Quality="HDTV"
end

The GUI returns that" attempt to index field "Video" ( a nil value)".
Could you help me out with how to set the value of <video><quality>?

If I can get this I'll work on an IF THEN statement to detect if HD is in the channel name.

thanks again
Ade
AdeG43
 
Posts: 3
Joined: Sat Apr 09, 2011 8:59 pm

Re: Insert HDTV tag based on channel name

Postby alanbirtles » Fri Apr 22, 2011 6:45 pm

program.Video may be null so you need to make sure its a table before you try to modify it:
Code: Select all
if AddHD then
   if not program.Video then
      program.Video = {}
      end
   program.Video.Quality="HDTV"
end


note that the above code hasn't been tested
alanbirtles
Site Admin
 
Posts: 493
Joined: Mon Sep 06, 2004 4:44 pm

Re: Insert HDTV tag based on channel name

Postby starfire » Wed Nov 21, 2012 9:38 am

Hi,

Did anyone get anywhere with this?

I too would like to have the ability to set the HDTV flag on all programs based on the channel name as Radio Times do not present this data?

Thanks.
starfire
 
Posts: 7
Joined: Wed Sep 01, 2010 9:36 pm


Return to XMLTV GUI V3

Who is online

Users browsing this forum: No registered users and 2 guests

cron