Page 3 of 4

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 7:18 am
by alanbirtles
bedfordcf wrote:I'm still getting the protocol error as described by b00sfuk at 9.27. If I lower the number of channels to 20 in the grabber script it works, any higher I get the error. Will await the next release which grabs 5 channels at a time.

thanks.
the updated script is in svn

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 10:54 am
by b00sfuk
Alan, ran the svn (assume just replace the new uk_digi.lua) and it works really well. Much quicker.

I've made a couple of changes to get the series/episode numbers working in the sub-title. Specifically:
In prog_details.lua last +1 was missing

Code: Select all

else str=string.format("Episode %d of %d",nums[1]+1,nums[2]+1) 
In xmltv_parse.lua the format needed changing from 1.1. to .1/1.

Code: Select all

prog.Episode.Number = "."..tag.Children["series-number"][1].Data-1 .."/"..tag.Children["episode-number"][1].Data-1 .."."
I'm also going to look at (for my needs to make the GB-PVR EPG look less cluttered) tidying up the subtitle format from
Episode 1 of 1 - Subtitle
to
Subtitle (1 of 1)

I suppose it would be nice with this data now to look at using it in GB-PVR for season recording, avoiding duplicates etc. (like I think zapit use to do) but I've not thought about this yet and whether it is a lot of effort. Guess that is a future subject for the GB-PVR forums.

thanks again
Simon

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 11:45 am
by b00sfuk
Further to my bit above about the subtitle and series/episode numbers.
I've found that Digiguide uses a different definition making the text incorrect I.E.
Prog_details sets it to be for example Episode 1 of 22
but
Digiguide uses format such as Series 1 Episode 1

This is the section I've changed in prog_details.lua for my own use but I guess it needs something more general that can handle the various grabbers. I just use (1/1) format but some might prefer the more general (S01E01) or (S1 Ep1) etc.
thanks

Code: Select all

						else str=string.format("%d/%d",nums[1]+1,nums[2]+1)
						end
				end
			end
		if str then
			if program.Sub_Title then
				str=" ("..str..")"
				end
			program.Sub_Title=XGUI_Lib.XS.Prefix(str,program.Sub_Title)

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 1:01 pm
by alanbirtles
the error is in the program details processor. the digiguide grabber is correct.

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 1:06 pm
by alanbirtles
actually after checking the processor code it does seem to be correct and handles everything correctly

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 4:18 pm
by b00sfuk
alanbirtles wrote:actually after checking the processor code it does seem to be correct and handles everything correctly
Alan, sorry I don't understand. Are you saying that:
1. prog_details.lua is correct not to add a +1 onto the second episode parameter?
2. The digiguide section in xmltv_parse.lua for episodes is correct to set format "1.1." rather than ".1/1." ? The latter format being when prod_details.lua understands?

thanks again
Simon

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 4:26 pm
by alanbirtles
the format of the episode numbers is

Code: Select all

series -1 /total number of series . episode -1 / total number of episodes . part -1 / total number of parts
any of the numbers and the slashes are optional. The output from the digiguide grabber is correct and I believe that the processor is parsing correctly. It may not be able to handle the missing slash (its a long time since i wrote that code and i cant remember if i tested missing slashes)

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 6:10 pm
by alanbirtles
the lastest svn of program details now handles all forms of episode number correctly and also has an option to use the short form (ie S1E1)

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 8:14 pm
by b00sfuk
Thanks Alan, this svn looks good though for some reason I still cannot get the episode numbers to appear in the sub-title. Take this example programme.

Code: Select all

  <programme start="20080606200000 +0100" stop="20080606210000 +0100" channel="104">
    <title>Deadliest Catch</title>
    <sub-title>The Finish Line</sub-title>
    <desc>It&apos;s the deadliest job in the world: crab fishing off the Alaska coast in some of the most violent waters on earth. But the rewards are great. Deadliest Catch follows the handful of adventurers battling Arctic weather, brutal waves and a ticking clock for a chance at big money in this modern-day gold rush.</desc>
    <category>Documentary</category>
    <episode-num system="xmltv_ns">.1/4.</episode-num>
  </programme>
I assume I've installed the svn build right as I just copied across wheat I saw as new files. Specifically these 4:
init.lua
prog_details.luia
uk_digi.lua
uk_digi_alt_digi.lua

thanks for all this. It is perfect for me if I could just get the numbers in the sub-title. I have this in my hacked version OK but would rather stick to releases.

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 8:16 pm
by b00sfuk
...Just noticed I got an error in the log file so it mught be me...checking

Code: Select all

20:09:24 - Starting pass 1 of processor PrgDets
20:09:24 - C:\Program Files\XMLTV GUI\scripts/prog_details.lua:15: bad argument #2 to `find' (string expected, got no value)
20:09:24 - Grab failed on program ""
20:09:24 -    Finished pass 1 of processor PrgDets

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 9:17 pm
by alanbirtles
i forgot to test it for episodes with slashes, the latest svn should work

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 9:43 pm
by b00sfuk
Working great now, thanks. Only minor thing is that I still need to modify to add the +1 to episode number.
E.G take this programme where the actual episode is Series 8 Episode 13. So the episode number is out by one. It is also a little confusing for Digiguide users as the E8/12 might imply that it is episode 8 (out of 12 which is the way that Radio Times works) rather than series 8. Once I add the +1 to the script (b+1 in prog_details) I'm happy so please don't feel you need to change anything just for me; you have done so much already.
It is great to have better quality date and more channels in GB-PVR now.
Thanks again.
Simon French

Code: Select all

  <programme start="20080605024500 +0100" stop="20080605032500 +0100" channel="104">
    <title>Stargate SG-1</title>
    <sub-title>E8/12 - It&apos;s Good to be King</sub-title>
    <desc>An elite hand-picked team of soldiers and scientists travel through a portal to discover strange and alien worlds beyond.
When SG-1 is called to the planet that Harry Maybourne was relocated to by the Tok&apos;ra, they discover that Harry has made himself king using knowledge of the Ancients... knowledge that may give them access to the Ancients&apos; time-travel technology.</desc>
    <credits>
      <director>William Gereghty</director>
      <actor>Richard Dean Anderson</actor>
      <actor>Michael Shanks</actor>
      <actor>Amanda Tapping</actor>
      <actor>Christopher Judge</actor>
    </credits>
    <category>Science Fiction Series</category>
    <episode-num system="xmltv_ns">.7/12.</episode-num>
    <previously-shown/>
  </programme>

Re: Digiguide grabber detail in 3.10.00W

Posted: Fri Jun 06, 2008 10:07 pm
by alanbirtles
are you still using your modified xmltv parse? the digiguide output should show episode number and series number. radio times will show episode number and number of episodes

Re: Digiguide grabber detail in 3.10.00W

Posted: Sat Jun 07, 2008 7:49 am
by b00sfuk
alanbirtles wrote:are you still using your modified xmltv parse? the digiguide output should show episode number and series number. radio times will show episode number and number of episodes
Oops :oops: you are absoultely right. The svn updates work beautifully now.
Thanks again

Re: Digiguide grabber detail in 3.10.00W

Posted: Sat Jun 07, 2008 5:44 pm
by alanbirtles
all changes are now wrapped into 3.10.02