NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
1 2 3 4 5 … 93 Next »
NextPVR web API for scheduling - DayMask

 
  • 0 Vote(s) - 0 Average
NextPVR web API for scheduling - DayMask
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,020
Threads: 956
Joined: May 2006
#1
2019-05-31, 07:54 PM (This post was last modified: 2019-05-31, 08:17 PM by mvallevand.)
Sub looking at pvr.nextpvr code I was wondering if there was also an "Any Day" dayMask I could use with &day_mask= that Kodi doesn't enable? NUtility does have one.

Code:
std::string cPVRClientNextPVR::GetDayString(int dayMask)
{
  std::string days;
  if (dayMask == (PVR_WEEKDAY_SATURDAY | PVR_WEEKDAY_SUNDAY))
  {
    days = "WEEKENDS";
  }
  else if (dayMask == (PVR_WEEKDAY_MONDAY | PVR_WEEKDAY_TUESDAY | PVR_WEEKDAY_WEDNESDAY | PVR_WEEKDAY_THURSDAY | PVR_WEEKDAY_FRIDAY))
  {
    days = "WEEKDAYS";
  }
  else
  {
    if (dayMask & PVR_WEEKDAY_SATURDAY)
      days += "SAT:";
    if (dayMask & PVR_WEEKDAY_SUNDAY)
      days += "SUN:";
    if (dayMask & PVR_WEEKDAY_MONDAY)
      days += "MON:";
    if (dayMask & PVR_WEEKDAY_TUESDAY)
      days += "TUE:";
    if (dayMask & PVR_WEEKDAY_WEDNESDAY)
      days += "WED:";
    if (dayMask & PVR_WEEKDAY_THURSDAY)
      days += "THU:";
    if (dayMask & PVR_WEEKDAY_FRIDAY)
      days += "FRI:";
  }

  return days;
}

Also how to I indicate a Timeslot recording just add the start and end timestamps?

Thanks.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,759
Threads: 769
Joined: Nov 2003
#2
2019-05-31, 10:18 PM
If you don't pass in a &day_mask= parameter, it'll assume any day. Alternatively you'd need to pass &day_mask=SAT|SUN|MON|TUE|WED|THU|FRI

You can pass in &timeslot=true, though if you're using &recurring_type, these have a fixed definition of whether timeslot is enabled:

case 1: // Record Season (NEW episodes on this channel)
…
case 2: // Record Season (All episodes on this channel)
...
case 3: // Record Season (Daily, this timeslot)
...
case 4: // Record Season (Weekly, this timeslot)
...
case 5: // Record Season (Monday-Friday, this timeslot)
...
case 6: // Record Season (Weekends, this timeslot)
...
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,020
Threads: 956
Joined: May 2006
#3
2019-06-01, 12:10 AM
Emby doesn't use any of those timeslots standard but x-newa does so that will make my life a little easier.

Is that a pipe or semi-colon like Kodi uses?

Also for the All Channel scheduling with &keyword= logic, do you respect <RecurringMatchExact> in config.xml?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,759
Threads: 769
Joined: Nov 2003
#4
2019-06-01, 02:49 AM
mvallevand Wrote:Is that a pipe or semi-colon like Kodi uses?
Yeah, go with semi-colon.

Quote:Also for the All Channel scheduling with &keyword= logic, do you respect <RecurringMatchExact> in config.xml?
Yes, I think so.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,020
Threads: 956
Joined: May 2006
#5
2019-06-01, 05:45 PM
sub Wrote:You can pass in &timesslot=true, though if you're using &recurring_type, these have a fixed definition of whether timeslot is enabled:

With these options do I need start and end time?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,759
Threads: 769
Joined: Nov 2003
#6
2019-06-01, 06:22 PM
Its been quite a while since I've looked at this, but I'm pretty sure it calculates the timeslot from the start time of the original event used to create the recurring recording (&event_id=), and defaults to finding shows that start with +/- 90 minutes of that original time (but prefers that exact same start time if there is show with that time)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,020
Threads: 956
Joined: May 2006
#7
2019-06-01, 07:11 PM
Thanks, everything seems to be working as expected and it quite logical now that I understand. One thing Kodi does for All Channels All Episodes, is allow a timeslot and fakes a keyword search. I like the looks a the NextPVR created All Channels recurring record better because it is clearer to me looking at the list. Is there a type for that and does it allow a start and end date?

Martin
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,020
Threads: 956
Joined: May 2006
#8
2019-06-03, 07:45 PM
I am bumping this thread with some additional info. It looks like the are both type 7

Code:
2019-06-03 15:40:27.539 T:13620   DEBUG: {u'name': u'Coronation Street', u'enabled': True, u'postPadding': 2, u'channelID': 0, u'prePadding': 1, u'period': u'KEYWORD: Coronation Street', u'keep': 0, u'advancedRules': u'KEYWORD: Coronation Street', u'type': 7, u'id': 448, u'channel': u'All Channels'}

2019-06-03 15:40:27.539 T:13620   DEBUG: {u'name': u'Rizzoli & Isles', u'enabled': True, u'postPadding': 2, u'channelID': 0, u'prePadding': 1, u'period': u'All Episodes', u'keep': 0, u'advancedRules': u"title like 'Rizzoli & Isles'", u'type': 7, u'id': 449, u'channel': u'All Channels'}

What I'd like to be able to do from the API is create that second type of All Channels recording. I am finding additional issues with the Keyword search because it seems to schedule things not just based on the Title I tried Monk and I had 100's of recordings.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,759
Threads: 769
Joined: Nov 2003
#9
2019-06-03, 11:35 PM
That 'all episodes' 'all channels', as shown above on Paw Patrol is really a special case to make it look nicer. It does it when it's an advanced recording, with the query title like 'name'. You could probably pass in that instead of a keyword to get the same behaviour.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,020
Threads: 956
Joined: May 2006
#10
2019-06-03, 11:47 PM (This post was last modified: 2019-06-04, 12:40 AM by mvallevand.)
The API parameter I know for this requires &keyword=... and when I tried adding that query I get

<AdvancedRules>KEYWORD: title like'Man With a Plan'</AdvancedRules>

Edit if I manually remove the 'KEYWORD: ' from the database it does display like NextPVR. Perhaps you could not prepend "KEYWORD: " if the parameter starts with "title like '"

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  FM tuner support in NextPVR? Goongyae 2 1,463 2022-11-23, 01:22 PM
Last Post: mvallevand
  NextPVR 5: When is PIN Required for API Access? pkscout 3 2,755 2020-05-26, 04:45 AM
Last Post: sub
  NextPVR "Service" Backend? jcole998 5 4,856 2018-05-24, 01:17 PM
Last Post: jcole998
  NextPVR and NRecord, between releases, updates p37307 1 2,596 2016-10-29, 01:08 AM
Last Post: sub
  How does NextPVR group recordings for XBMC? spinnaker 2 2,331 2013-11-21, 01:33 AM
Last Post: spinnaker
  Is the input file for pvrx2.exe -import unique to NextPVR? spinnaker 1 1,797 2013-10-08, 02:25 AM
Last Post: sub
  Scheduling recordings mvallevand 6 3,143 2012-08-11, 06:04 PM
Last Post: mvallevand
  Recorder plugins - scheduling mvallevand 4 2,451 2012-03-26, 05:09 PM
Last Post: mvallevand
  Get NextPVR data directory from outside a plugin McBainUK 3 2,292 2012-02-11, 05:42 PM
Last Post: mvallevand
  Martin's installer for NextPVR :-) steeb 4 2,639 2011-07-15, 12:32 AM
Last Post: steeb

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode