brianavid Posted May 18, 2015 Share Posted May 18, 2015 So far the work to incorporate DVBViewer into my existing HTPC system is going well. But I do have one outstanding issue ... The parameters documented for /api/timeradd.html do not include those returned by /api/timerlist.html as PreEPG, PostEPG and EPGEventID <timer> attributes. These values are set when using the RS Web UI via /timer_new.html with the "before", "after" and "epgevent" parameters. But the parameters for this URL are not documented and (presumably) /api/timeradd.html is the preferred way to add timers in my software. Using these values would allow my code to better present the set of scheduled timers and relate them to the the EPG. Is there a way to do this? Or should I reverse engineer the parameter set for /timer_new.html?? Thanks Brian Quote Link to comment
brianavid Posted May 23, 2015 Author Share Posted May 23, 2015 Well - no advice, so I've just gone ahead with timer_new.html. I'm not completely happy with using a UI URL when there is an API available, but it fixes my problem. I now know the padding applied and the epgEventId. So instead of : String.Format( "http://localhost:8089/api/timeradd.html?ch={0}&dor={1}&enable=1&start={2}&stop={3}&title={4}", programme.Channel.Id, (programme.StartTime - EpgBaseDate).Days, programme.StartTime.Hour * 60 + programme.StartTime.Minute, programme.StopTime.Hour * 60 + programme.StopTime.Minute, System.Uri.EscapeDataString(programme.Title)) I am using : String.Format( "http://localhost:8089/timer_new.html?active=active&prio=50" + "&channel={1}" + "&title={2}" + "&dor={3}&epgbefore={4}&starttime={5}&endtime={6}&epgafter={7}" + "&Exitaktion=0&Aufnahmeaktion=0&folder=Auto&Series=&Format=2" + "&scheme=%25year-%25date_%25time_%25station_%25event" + "&RecAllAudio=checkbox&PATPMTAdjust=checkbox&searchaction=none&aktion=timer_add&source=timer_add" + "&referer={8}" + "&timer_id=&do=&timertype=0&save=Speichern&pdc=0&epgevent={9}&_={10}", Host, programme.Channel.Number, System.Uri.EscapeDataString(programme.Title), programme.StartTime.ToString("dd.MM.yyyy"), recordingPrePadMinutes, System.Uri.EscapeDataString(programme.StartTime.ToString("HH:mm")), System.Uri.EscapeDataString(programme.StopTime.ToString("HH:mm")), recordingPostPadMinutes, System.Uri.EscapeDataString("http://localhost:83/Guide/Home"), programme.Id, DateTime.UtcNow.Ticks) Ugly yes - but so far, so good Brian Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.