Click here to go to the forum index Click here for the home page
Author Message

<  MyStuff  ~  MyStuff-Freeview channel time limiter

Page 1 of 1
Posted: Thu Feb 09, 2006 5:06 pm Reply with quote
Regular contributor Joined: 27 Nov 2005 Posts: 30
If you are using MyStuff Extended Info with the latest XMLTV GUI (V3.02.01W afik) it's possible to modify the XML file during processing in XMLTV to remove data when there is no transmission on a channel on Freeview.

Alan Birtles, the creator of XMLTV GUI has written a script to do the job of stripping out the unwanted programmes, the thread on his site can be seen here.

I have added the data for the start and stop times for the various channels to his script.

local channels={{id="288",start=12,stop=5},{id="271",start=19,stop=5},{id="291",start=18,stop=23},{id="423",start=9,stop=13},{id="147",start=12,stop=0},{id="150",start=6,stop=12},{id="45",start=19,stop=5},{id="47",start=19,stop=5},{id="1961",start=18,stop=6},{id="1856",start=6,stop=18},{id="921",start=19,stop=5},{id="923",start=6,stop=18},{id="801",start=7,stop=1},{id="176",start=11,stop=4},{id="123",start=13,stop=23},{id="128",start=6,stop=18},{id="1661",start=5,stop=12},{id="742",start=5,stop=9},{id="120",start=5,stop=9}}


local function Pass1Func(proc,program)
   local dst,starthour,stophour
   local i,n
   XGUI.SetStatus(2,"Processing "..XGUI_Lib.XS.Val(program.Title))
   if dst then
   for i=1,n do
      if program.Channel==channels[i].id then
         local start1=channels[i].start
         local stop1=channels[i].stop
         if start1<stop1 then
            if (((starthour>=start1)and(stophour<stop1))
               and((stop1==0)or(stophour>=starthour)) then
                  return program
                  else return XGUI.OK
            if (starthour>=start1)
               or (stophour<stop1)
               or ((stophour==stop1)and(program.Stop.Minute==0))then
                  return program
            local p2={}
            p2.Description="Channel currently off air"
            return p2
   return program

   Name = "UK - Radio Times freeview channel time limiter",
   Version = "1.00.01",
   Author = "Alan Birtles",
   InfoURL = "",
   Grabber = "UK_RT",

The forum software doesn't like the length of the first line, so has written it as:


It should read:

local channels={etc

Save the script above as ukrt_freeview_limit.lua and store it in the C:\Program Files\XMLTV GUI\scripts\uk_rt folder.

Then go to settings and postprocessors and select the UK_RT_Free_Limit post processor. The unwanted program listings should be stripped from the XML file by the post processor.

It seems to work correctly, but if there are any timing errors or missed part time channels, please make a post.

Thanks for the script Alan.

Last edited by Malcy on Thu Feb 09, 2006 11:30 pm; edited 1 time in total
View user's profile Send private message
Posted: Thu Feb 09, 2006 10:11 pm Reply with quote
Frequent contributor Joined: 07 Dec 2005 Posts: 814

Yes I find this code works very well for my epg guide.

View user's profile Send private message

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum