Jump to content

Can adding a timer via API set PreEPG, PostEPG and EPGEventID?


brianavid

Recommended Posts

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

Link to comment

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(
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(
"&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

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...