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
#1
2008-02-18, 09:37 PM
Hi,

I've been busy developing TV scheduling software, and just finished adding support for it to control GBPvr as a recorder. Everything works fine, but I have a couple of questions concerning the API I have to use to schedule the recordings in GBPvr. Here they come :

1) My scheduling system uses a channelname to schedule a recording. GBPvr requires a channelOid. Is there a way to retrieve a list of channels (with their Oid) GBPvr can capture and record ?

2) Can I retrieve the "recordingsdirectory" via the API ?
According the doc, there is a static method "GBPVRRecordingsDir" in the class GBPVRINfo in assembly CommonGBPvrUtilities, but I cannot find the assembly on my system.

3)scheduleHelper.SheduleRecording has an (undocumented) overload which takes an int argument called "daymask". What is its purpose ?

4) Can I control on which card the recording will be processed if my system has more than one card ?

Thanks for your support.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2008-02-18, 09:46 PM
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.

2) sorry, there is no API to do this. You can read it from the config.xml file though. Its stored in the <RecordingsDirectory> setting.

3) the day mask is an OR'd combination of the following constants (defined in the ReoccuringRecordingExtras class):

Code:
        public const int DAY_SUNDAY            = 1;
        public const int DAY_MONDAY            = 2;
        public const int DAY_TUESDAY            = 4;
        public const int DAY_WEDNESDAY            = 8;
        public const int DAY_THURSDAY            = 16;
        public const int DAY_FRIDAY            = 32;
        public const int DAY_SATURDAY            = 64;

4) No, the system chooses based on a predefined set of rules.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,591
Threads: 386
Joined: Dec 2004
#3
2008-02-18, 09:57 PM
Ernie-c Wrote:2) Can I retrieve the "recordingsdirectory" via the API ?
With reference to sub's response, this is the code I use if it's of any use to you...
Code:
XmlDocument ConfigDoc = new XmlDocument();
ConfigDoc = PluginHelperFactory.getPluginHelper().GetConfiguration();
XmlNodeList nl = ConfigDoc.GetElementsByTagName("RecordingsDirectory");
string RecordingsDir = nl.Item(0).InnerText;
if (!RecordingsDir.EndsWith(@"\"))
    RecordingsDir += @"\";
Cheers,
Brian
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#4
2008-02-18, 09:57 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.
That returns a list of scheduled recordings, what I want to have is a list of all possible channels, so a complete list.

sub Wrote:2) sorry, there is no API to do this. You can read it from the config.xml file though. Its stored in the <RecordingsDirectory> setting.
I could, but better would be if if was available through an API. Same for the list of channels , I could also read them from the DB, but that's not the way you want to go, because what if the DB changes ...

sub Wrote:3) the day mask is an OR'd combination of the following constants (defined in the ReoccuringRecordingExtras class):

Code:
        public const int DAY_SUNDAY            = 1;
        public const int DAY_MONDAY            = 2;
        public const int DAY_TUESDAY            = 4;
        public const int DAY_WEDNESDAY            = 8;
        public const int DAY_THURSDAY            = 16;
        public const int DAY_FRIDAY            = 32;
        public const int DAY_SATURDAY            = 64;
Thanks, that's clear
sub Wrote:4) No, the system chooses based on a predefined set of rules.
Ok, can I get the info (on what card is was recorded) afterwards ?

Thanks for the very fast reply :-)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#5
2008-02-18, 10:10 PM
Ernie-c Wrote:
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.
That returns a list of scheduled recordings, what I want to have is a list of all possible channels, so a complete list.
No it doesnt. It returns a list of Channel objects, which sounds like what you want.

Quote:
sub Wrote:2) sorry, there is no API to do this. You can read it from the config.xml file though. Its stored in the <RecordingsDirectory> setting.
I could, but better would be if if was available through an API. Same for the list of channels , I could also read them from the DB, but that's not the way you want to go, because what if the DB changes ...
I'm unlikely to add it before you need it, so you might as well follow bgowlands recommendation above.

Quote:
sub Wrote:4) No, the system chooses based on a predefined set of rules.
Ok, can I get the info (on what card is was recorded) afterwards ?
Thanks for the very fast reply :-)
Up until the time the recording occurs the capture source can be changed.
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#6
2008-02-18, 10:24 PM
sub Wrote:No it doesnt. It returns a list of Channel objects, which sounds like what you want.
OK, I'll give it another try, and post my findings

sub Wrote:I'm unlikely to add it before you need it, so you might as well follow bgowlands recommendation above.
I'll add it like this in my proxy object, and change it whenever the method comes available.

sub Wrote:Up until the time the recording occurs the capture source can be changed.

And once the recording is done ? How can I retrieve the card/source it was recorded on ?
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#7
2008-02-18, 10:28 PM
sub Wrote:
Code:
    public const int DAY_SUNDAY            = 1;
        public const int DAY_MONDAY            = 2;
        public const int DAY_TUESDAY            = 4;
        public const int DAY_WEDNESDAY            = 8;
        public const int DAY_THURSDAY            = 16;
        public const int DAY_FRIDAY            = 32;
        public const int DAY_SATURDAY            = 64;
Why not use enums for this kind of stuff ?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#8
2008-02-19, 01:14 AM
Ernie-c Wrote:Why not use enums for this kind of stuff ?
I could of, but I didnt. It achieves the same result.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#9
2008-02-19, 01:15 AM
Ernie-c Wrote:And once the recording is done ? How can I retrieve the card/source it was recorded on ?
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.
Ernie-c
Offline

Junior Member

Posts: 27
Threads: 2
Joined: Feb 2008
#10
2008-02-19, 09:03 AM
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 ?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Import/export recordings via API? whurlston 4 3,889 2019-02-19, 11:48 AM
Last Post: Graham
  Conflict recordings scJohn 1 2,637 2018-03-23, 07:43 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 3,381 2018-01-13, 05:17 AM
Last Post: Pbathuk
  API access to artwork and deleting recordings cncb 29 16,001 2016-11-06, 02:20 AM
Last Post: mvallevand
  How to move recordings without them getting deleted from db drmargarit 4 3,979 2015-09-27, 05:33 PM
Last Post: sub
  Best approach to creating recurring recordings from c# drmargarit 0 2,658 2015-09-27, 01:32 AM
Last Post: drmargarit
  Changing the recording priority on recurring recordings cbgifford 4 3,891 2014-08-17, 03:13 PM
Last Post: Kiwi
  How does NextPVR group recordings for XBMC? spinnaker 2 2,368 2013-11-21, 01:33 AM
Last Post: spinnaker
  Web API call for Ready recordings? bgowland 2 1,938 2013-11-03, 12:43 AM
Last Post: bgowland
  Delete recordings from database but not from disk? spinnaker 8 3,933 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