ok, below is the function i added, essentially it builds a url from the program information, and calls it. the information in the url is passed to my tvcards webinterface which schedules a recording.
basic pics can be seen at
http://www.dragon256.plus.com - you'll see i played with the graphics a bit
and introduced channel logo's
instead of having this in the main bulk of the script, i was wondering if it could be added as an add in as such, instead of me having to add it to each revision of script - although i dont mind at all, im more than happy at the moment being able to set recordings from my xbox !
there's probaly better ways of doing it all rather than the below, but it was my 1st attempt...
was thinking about the menu - the code below sets an individual recording, but by changing the 0 at the end of the url, to 1 then its weekly... perhaps the y button could tie to another menu with other funtions, like that below, or as you mentioned earlier in the thread torrent sites, or other functions.. eg. favourites and stuff :-)
if action == action_record: #### recording linked to record button - have to define in keymap - set to code 23 keymap 2010
prog = self.epgbuttons[self.epgchidx][self.epgbtnidx][self.epgbuttonsbtndata_prog]
self.infowin = progdescdialog()
self.infowin.settitle(prog.gettitle())
desc = prog.getdescription()
if desc == "": desc = "no information"
starttime = self.currenttime.timetohhmm(prog.getstarttime())
endtime = self.currenttime.timetohhmm(prog.getendtime())
starttime2 = self.currenttime.duration(prog.getstarttime()) #start and finish codes minus :
endtime2 = self.currenttime.duration(prog.getendtime()) #start and finish codes
banana = (int(prog.getendtime()-prog.getstarttime())) / 60 #duration in mins need to make 4 digits
pear = len (str(banana))
if pear == 1 : banana2 = "000"+str(banana)
if pear == 2 : banana2 = "00"+str(banana)
if pear == 3 : banana2 = "0"+str(banana)
if pear == 4 : banana2 = banana # changed to 4 digit times
savedate = self.currenttime.timetofiledate2(self.currenttime.getcurrenttime()) # date code - correct for digitv web interface (ddmmyy)
apple = (self.epgchidx) # channel position on screen eg. bbc1 = 0
lcn="0"
if apple == 0 : lcn = "001" # manually code lcn codes vs. channel position
if apple == 1 : lcn = "002" # lcn codes are the channels by transmitter id
if apple == 2 : lcn = "003" # could only figure out how to link by position on screen vs.
if apple == 3 : lcn = "004" # setting the lcn for all channels
if apple == 4 : lcn = "005"
if apple == 5 : lcn = "006"
if apple == 6 : lcn = "007"
if apple == 7 : lcn = "010"
if apple == 8 : lcn = "014"
if apple == 9 : lcn = "007"
if apple == 10 : lcn = "010"
if apple == 11 : lcn = "014"
orange = prog.gettitle()
orange2 = ''.join(orange.split())
cherry = lcn + str (starttime2) + str (savedate) + banana2 + "0"
if xbmcgui.dialog().yesno("request","set recording ?"):
yourip = "192.168.0.1"
p = "[url]http://"+[/url] yourip +":2880/timers.htm?name=" + str(orange2) + ";?timer=" + cherry
f = urllib.urlopen(p)
print f.read() # dumps result into the log. probably another way to do though..