NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 9 10 11 12 13 … 93 Next »
Scheduling recordings

 
  • 0 Vote(s) - 0 Average
Scheduling recordings
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#1
2012-08-07, 02:22 AM (This post was last modified: 2012-08-07, 03:45 AM by mvallevand.)
I am trying to write a command line program to deal with unique_id across and I expect it won't be too difficult, but I have a couple of questions

1) Is this the right command to use for scheduling unique recordings

NUtility.ScheduledRecording ScheduleRecording(string name, int channelOID, System.DateTime startTime, System.DateTime endTime, int prePadding, int postPadding, NUtility.RecordingQuality quality, string recordingDirectoryID)

2) I think these recordings are sticky and I will need to delete them. Is that correct?

3) If my command line runs in PostEPGUpdate will ScheduleRecording() fail with null on a conflict on that channel or do I have to make sure the time is open?

(edit)

4) Do I Cancel or Delete recordings? I thought about it and I guess Cancel is scheduled and Delete removes them when they are not status zero. Right?

5) To cancel or deletes is it

Code:
;
            int recording_oid = from a lookup;
            ScheduledRecording recording = ScheduledRecording.LoadByOID(recording_oid);
            if (recording != null)
           {
                ScheduleHelperFactory.GetScheduleHelper().DeleteRecording(recording);
            }



Thanks,

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,394
Threads: 741
Joined: Nov 2003
#2
2012-08-07, 04:02 AM
mvallevand Wrote:I am trying to write a command line program to deal with unique_id across and I expect it won't be too difficult, but I have a couple of questions

1) Is this the right command to use for scheduling unique recordings

NUtility.ScheduledRecording ScheduleRecording(string name, int channelOID, System.DateTime startTime, System.DateTime endTime, int prePadding, int postPadding, NUtility.RecordingQuality quality, string recordingDirectoryID)
Yes, you can use that call. This is what is used when you schedule a manual one-off recording.

Quote:2) I think these recordings are sticky and I will need to delete them. Is that correct?
What do you mean? They'd be one-off recordings, not recurring recordings. Not sure if that is what you're asking though,

Quote:3) If my command line runs in PostEPGUpdate will ScheduleRecording() fail with null on a conflict on that channel or do I have to make sure the time is open?
Yes, it'd return null if it cant be scheduled.

Quote:(edit)
4) Do I Cancel or Delete recordings? I thought about it and I guess Cancel is scheduled and Delete removes them when they are not status zero. Right?

5) To cancel or deletes is it

Code:
;
            int recording_oid = from a lookup;
            ScheduledRecording recording = ScheduledRecording.LoadByOID(recording_oid);
            if (recording != null)
           {
                ScheduleHelperFactory.GetScheduleHelper().DeleteRecording(recording);
            }
Yes, you can do that to delete or cancel a recording.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#3
2012-08-07, 04:06 AM
sub Wrote:What do you mean? They'd be one-off recordings, not recurring recordings. Not sure if that is what you're asking though,

Thanks a lot for the help. For this I just wanted to make sure that I had to be responsible for cancelling them, if they aren't in the next batch.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#4
2012-08-11, 05:42 AM
Is there something I have to do on the server PC to schedule recordings I can't initiate it

Code:
if (ScheduleHelperFactory.GetScheduleHelper() == null)
            {
                Logger.Debug("What now");
                return;
            }

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#5
2012-08-11, 01:48 PM
The reason I can't schedule recordings from the command line is I needed a couple of other lines (found in NEWA)

Code:
RecordingServiceProxy.ForceRemote();
                ScheduleHelperFactory.SetScheduleHelper(RecordingServiceProxy.GetInstance());


However I still can't run because of the tuner plugin.

Code:
2012-08-11 09:36:52.521    [INFO][1]    About to connect to remote recording service
2012-08-11 09:36:52.523    [DEBUG][1]    RecordingServiceProxy@exit
2012-08-11 09:36:52.554    [ERROR][1]    Specified capture plugin not found: NetworkRecorder.NetworkRecorder
2012-08-11 09:36:52.554    [ERROR][1]    Specified capture plugin not found: NetworkRecorder.NetworkRecorder

How can I force a command line program to load this? NEWA seems to work ok and load the plugins

Code:
2012-08-11 08:12:24.187    [INFO][3]    About to connect to remote recording service
2012-08-11 08:12:24.219    [DEBUG][3]    RecordingServiceProxy@exit
2012-08-11 08:12:24.248    [DEBUG][3]    About to look for plugin directories in: C:\Users\Public\NPVR\Plugins\
...

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,394
Threads: 741
Joined: Nov 2003
#6
2012-08-11, 05:43 PM
You probably also need to call (NUtility) PluginRegistry.LoadPlugins().

This call and the one you mentioned above were never really intended to be used by developers though, so I reserve the right to unintentionally break them in the future Big Grin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#7
2012-08-11, 06:04 PM
Great that works nicely, it also shows an error that I was meaning to post for whurlston and ACTCMS that I get when I run the --updateepg command line version.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPVR web API for scheduling - DayMask mvallevand 28 6,462 2021-05-11, 10:07 PM
Last Post: mvallevand
  Import/export recordings via API? whurlston 4 2,997 2019-02-19, 11:48 AM
Last Post: Graham
  Conflict recordings scJohn 1 2,102 2018-03-23, 07:43 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 2,631 2018-01-13, 05:17 AM
Last Post: Pbathuk
  API access to artwork and deleting recordings cncb 29 12,429 2016-11-06, 02:20 AM
Last Post: mvallevand
  How to move recordings without them getting deleted from db drmargarit 4 3,115 2015-09-27, 05:33 PM
Last Post: sub
  Best approach to creating recurring recordings from c# drmargarit 0 2,172 2015-09-27, 01:32 AM
Last Post: drmargarit
  Changing the recording priority on recurring recordings cbgifford 4 2,781 2014-08-17, 03:13 PM
Last Post: Kiwi
  How does NextPVR group recordings for XBMC? spinnaker 2 1,746 2013-11-21, 01:33 AM
Last Post: spinnaker
  Web API call for Ready recordings? bgowland 2 1,362 2013-11-03, 12:43 AM
Last Post: bgowland

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

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

Linear Mode
Threaded Mode