NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 31 32 33 34 35 … 93 Next »
Recordings via the IScheduleHelper API

 
  • 0 Vote(s) - 0 Average
Recordings via the IScheduleHelper API
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#11
2008-02-19, 09:05 AM
sub Wrote:I could of, but I didnt. It achieves the same result.
Using enums you would better support the user of your API, by giving him intellisense, and at the same time avoid impossible values. Using ints I had to find out possible values in the documentation, and couldn't find them.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#12
2008-02-19, 02:42 PM
Ernie-c Wrote:
sub Wrote:The public API doesnt give you this information, but you can look at the capture_source_oid column of the RECORDING_SCHEDULE table after the recording is complete.
Thanks. Are there any plans to add/extend this API further ?
I have no immediate plans to change this particular part of the public API. I prefer to keep the internals of capture sources etc in the private API.

Ernie-c Wrote:Using enums you would better support the user of your API, by giving him intellisense, and at the same time avoid impossible values. Using ints I had to find out possible values in the documentation, and couldn't find them.
I'm aware of the differences. The constants work just fine though. Its been this way for three years, and we've never had a problem with them to date, so I dont see any need to change it now.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#13
2008-02-19, 02:53 PM
If you prefer to use an enum, you can easily construct your own with those int values.
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#14
2008-02-19, 03:21 PM
sub Wrote:I have no immediate plans to change this particular part of the public API. I prefer to keep the internals of capture sources etc in the private API.


Pitty, because it reduces the functionality and power of the combination of our scheduler with GBPvr as a recorder a lot.

sub Wrote:I'm aware of the differences. The constants work just fine though. Its been this way for three years, and we've never had a problem with them to date, so I dont see any need to change it now.

I'm not really having a problem with these ints, I'm only I saying it would be more API-userfriendly.

whurlston Wrote:If you prefer to use an enum, you can easily construct your own with those int values.

True, but then I have to check every new version for possible added / changed enums, while that is the responsibility of the one who writes the API
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#15
2008-02-19, 03:45 PM
Your original question about using enums was in regard to the use of "const int" for the days. I dont think we will be adding any days to the week anytime soon.
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#16
2008-02-19, 07:39 PM
whurlston Wrote:Your original question about using enums was in regard to the use of "const int" for the days. I dont think we will be adding any days to the week anytime soon.

But you could add "Weekends", "WorkingDays" for example to the enum ...
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#17
2008-02-19, 07:52 PM
We dont need to debate this any further. I chose to use constants. I could have used an enum instead, but I didnt. It doesnt really matter in the grand scheme of things. Everyone is welcome to have different personal preferences on coding style.
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#18
2008-02-19, 08:19 PM
sub Wrote:1) you could call IScheduleHelper.GetListingsForTimePeriod(DateTime. now, DateTime.now). This will return a list of Channel objects, which you can use to get the name and OID.

It works, Thanks !
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#19
2008-02-20, 11:16 PM (This post was last modified: 2008-02-20, 11:21 PM by Ernie-c.)
Hello again,

I have a question about the fileName argument (see below), because no matter what I put in, it seems that the recording filename is always constructed using the programme's Title + "_" + startdate + starttime.
Is that correct ? Is the argument no longer used ?

eg of a recording filename : "Test_20080221000822.mpg"

And what is the purpose of the maxFiles argument ?

ScheduledRecording scheduledRecording = scheduleHelper.SheduleRecording(programme.getChannelOID(),
programme.getStartTime(),
programme.getEndTime(),
programme,
ScheduledRecording.TYPE_RECORD_ONCE,
ScheduledRecording.GROUP_NONE,
fileName,
ScheduledRecording.QUALITY_HIGH,
1,
127, // = "any day"
0,
0);

Thanks.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#20
2008-02-20, 11:21 PM
Correct.

The supplied value is only used as part of the final filename when doing a manual recording. (ie, not linked to a programme)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Import/export recordings via API? whurlston 4 3,894 2019-02-19, 11:48 AM
Last Post: Graham
  Conflict recordings scJohn 1 2,641 2018-03-23, 07:43 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 3,385 2018-01-13, 05:17 AM
Last Post: Pbathuk
  API access to artwork and deleting recordings cncb 29 16,012 2016-11-06, 02:20 AM
Last Post: mvallevand
  How to move recordings without them getting deleted from db drmargarit 4 3,986 2015-09-27, 05:33 PM
Last Post: sub
  Best approach to creating recurring recordings from c# drmargarit 0 2,662 2015-09-27, 01:32 AM
Last Post: drmargarit
  Changing the recording priority on recurring recordings cbgifford 4 3,894 2014-08-17, 03:13 PM
Last Post: Kiwi
  How does NextPVR group recordings for XBMC? spinnaker 2 2,371 2013-11-21, 01:33 AM
Last Post: spinnaker
  Web API call for Ready recordings? bgowland 2 1,943 2013-11-03, 12:43 AM
Last Post: bgowland
  Delete recordings from database but not from disk? spinnaker 8 3,937 2013-10-26, 10:51 PM
Last Post: spinnaker

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

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

Linear Mode
Threaded Mode