UK_RT_Plus_One Errors

Discussion of Version 3 and developing lua grabbers
Post Reply
grahamleggat
Posts: 24
Joined: Wed Oct 06, 2004 8:50 am

UK_RT_Plus_One Errors

Post by grahamleggat »

Hi Alan

I seemed to have found a problem with the UK_RT_Plus_One postprocessor and timezones.lua

I have pasted at the bottom of this note the messages from the GUI.

I have tried to narrow this error down. In my ukrt_plus1_gen.lua I have the following:

local availablechannels={
{name="Paramount Comedy +1",offset=1,id="1061"},
{name="ITV2 +1",offset=1,id="185"},
{name="ITV3 +1",offset=1,id="1859"},
{name="Sci-Fi +1",offset=1,id="244"},
{name="UKTV Drama +1",offset=1,id="292"},
{name="Zone Reality +1",offset=1,id="746"}
}

If I de-select ITV3 and Zone Reality from the lua settings the script works fine, when I re-select either of these channels I get the error as detailed below. This has only started to happen over the last few days.

I wish you and your family a Merry Christmas and a Happy New year !


Graham


==========================================================
03:21:00 - Starting pass 1 of grabber UK_RT
03:21:00 - Please note that all data downloaded with this grabber is copyright of the Radio Times website (http://www.radiotimes.com) and the use of the data is restricted to personal use only. Also be aware that this service may not remain free and in future may become a paid-for service
03:21:06 - Radio Times returned a zero sized reply for channel Bid TV
03:21:06 - Clearing cache
03:21:06 - Finished pass 1 of grabber UK_RT
03:21:06 - 23557 programs found
03:21:06 - Starting pass 1 of processor PrgDets
03:21:11 - Finished pass 1 of processor PrgDets
03:21:11 - Starting pass 1 of processor UK_RT_Plus_One
03:21:13 - ...V\XMLTV\XMLTV RadioTimes\XMLTV GUI\lib/timezones.lua:163: attempt to compare nil with number
03:21:13 - Grab failed on program ""
03:21:13 - Finished pass 1 of processor UK_RT_Plus_One
03:21:13 - Combining Grabber Programs
03:21:13 - Finished Combining Grabber Programs
03:21:13 - Writing XML
03:21:19 - XML Written
alanbirtles
Site Admin
Posts: 495
Joined: Mon Sep 06, 2004 4:44 pm

Post by alanbirtles »

in lib\timezones.lua change the function time.daysinamonth to:

Code: Select all

function time.daysinamonth(Year,Month)
	Year = Year + math.floor((Month-1) / 12)
	Month = math.mod(Month-1, 12)+1
	if Month==1 then return 31
	elseif (Month==2) and time.IsLeap(Year) then return 29
	elseif Month==2 then return 28
	elseif Month==3 then return 31
	elseif Month==4 then return 30
	elseif Month==5 then return 31
	elseif Month==6 then return 30
	elseif Month==7 then return 31
	elseif Month==8 then return 31
	elseif Month==9 then return 30
	elseif Month==10 then return 31
	elseif Month==11 then return 30
	elseif Month==12 then return 31
	end
end
grahamleggat
Posts: 24
Joined: Wed Oct 06, 2004 8:50 am

Post by grahamleggat »

Hi Alan

Thanks for the amended code.

Happy New Year

Graham
Post Reply