NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 7 8 9 10 11 … 93 Next »
Interpretting RECURRING_RECORDING match_rules field

 
  • 0 Vote(s) - 0 Average
Interpretting RECURRING_RECORDING match_rules field
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#1
2013-04-22, 10:15 AM
[ATTACHMENT NOT FOUND]

Looking at the <Rules> for "Silent Witness" and "Restless" I understand the "All Episodes" and "All New Episodes" but how is the information for "Royal Institution Christmas Lectures" interpreted as "Daily" from the following XML...
Code:
<Rules>
  <EPGTitle>Royal Institution Christmas Lectures</EPGTitle>
  <ChannelOID>10032</ChannelOID>
  <ChannelName>BBC FOUR</ChannelName>
  <StartTime>2012-12-26T20:00:00.0000000Z</StartTime>
  <EndTime>2012-12-26T21:00:00.0000000Z</EndTime>
  <PrePadding>2</PrePadding>
  <PostPadding>5</PostPadding>
  <Quality>0</Quality>
  <Keep>0</Keep>
  <TimeslotStart>2012-12-26T17:50:00.0000000Z</TimeslotStart>
  <TimeslotEnd>2012-12-26T22:10:00.0000000Z</TimeslotEnd>
</Rules>

Also, what other elements would be present in <Rules> that would be for the different options (weekdays, weekends, all channels etc?).

Sorry, I'm being a bit lazy, I suppose I could just set up a recording with one of each and try to interpret the XML, but it would be useful to know for definite.

Cheers,
Brian
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2013-04-22, 06:13 PM
If <Days> tag isn't present, then it's every day, and will display 'daily'.

If <Days> tag is present, then it'll only happen on the days specified. When display this, if it's Saturday and Sunday it'll display 'weekends'. If it's Monday Tuesday Wednesday Thursday Friday, then it'll display 'weekdays'. If its a single day then it'll display 'weekly'.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#3
2013-04-22, 07:40 PM
sub Wrote:If <Days> tag isn't present, then it's every day, and will display 'daily'.

If <Days> tag is present, then it'll only happen on the days specified. When display this, if it's Saturday and Sunday it'll display 'weekends'. If it's Monday Tuesday Wednesday Thursday Friday, then it'll display 'weekdays'. If its a single day then it'll display 'weekly'.
Thanks - it was the <Days> tag I hadn't picked up on.

It occurs to me I will have to set some test recordings with the various settings anyway so I can check it at the nDroid side of things but at least I know what I should be looking for now.

Cheers,
Brian
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#4
2013-04-22, 11:44 PM
On a related note...I tried an All Episodes / All Channels recurring recording. Should it show up like this?

[ATTACHMENT NOT FOUND]

The "title like..." bit doesn't seem very user friendly (for non-tech people at least).
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#5
2013-04-22, 11:48 PM
Yeah 'all episodes / all channels' was a bit of an after thought, and really just creates an advanced rules recording behind the scenes. Not ideal, but it works.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#6
2013-04-23, 07:33 PM
OK final question (hopefully).

I set up a weekdays, weekends and weekly recording as a test and get the following for the <Days> elements...
Code:
<Days>MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY</Days>
<Days>SUNDAY, SATURDAY</Days>
<Days>TUESDAY</Days>
So do you check for exact sting matches such as...
Code:
if (DaysString.equals("MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY")) {...}
if (DaysString.equals("SUNDAY, SATURDAY")) {...}
If so, the only way I can think of to tell a weekly recurring recording, i.e., for a single day would be to chack that `DaysString` doesn't contain a comma (or space). Or am I missing something?

Cheers,
Brian
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#7
2013-04-24, 12:56 AM
Assuming you're using the NextPVR objects for loading these from the database, like RecurringRecording.LoadByOID(x), then you can just do recurringRecording.PeriodDescription to get the same descriptions as NextPVR shows on the recordings screen. This class also has Boolean properties for Monday/Tuesday/Wednesday/etc.

Behind the scenes the PeriodDescription uses those properties to do checks like:

Code:
if (Monday && Tuesday && Wednesday && Thursday && Friday && Saturday && Sunday)
                {
                    period += " (Daily)";
                }
                else if (Monday && Tuesday && Wednesday && Thursday && Friday)
                {
                    period += " (Week Days)";
                }
                else if (Saturday && Sunday)
                {
                    period += " (Weekends)";
                }
                else
...etc...
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#8
2013-04-24, 02:54 AM
Thanks again. No, I'm not using npvr objects as this is at the nDroid app end of things so I'm processing the XML from the local database match_rules field directly. The code you describe has given me a slightly different angle on what I was doing.

Cheers,
Brian
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Status field values in Table SCHEDULED_RECORDING scJohn 2 2,289 2019-07-03, 07:01 PM
Last Post: sub
  Scheduled_Recordings - Filename field limited to 50 characters? JavaWiz 6 4,395 2015-10-28, 10:46 PM
Last Post: JavaWiz
  Suppressing the Date/Time field from global.xml ACTCMS 7 3,131 2010-11-18, 01:36 AM
Last Post: ACTCMS
  @nowPlaying field question ACTCMS 7 2,839 2008-05-01, 05:02 AM
Last Post: bgowland
  Legend for RECORDING_SCHEDULE:status field jdonth 4 1,796 2007-12-20, 09:22 PM
Last Post: jdonth
  Rating field in programme-table alibert 2 1,619 2006-01-13, 02:42 AM
Last Post: UncleJohnsBand

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

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

Linear Mode
Threaded Mode