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
Thanks,
Martin
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