PDA

View Full Version : Changing ScheduledRecording Quality



KingArgyle
2004-11-15, 01:35 AM
Sub, is there anyway to change a ScheduledRecording's default quality through the plugin API?

I'm playing around with the following code:

ScheduleHelper scheduleHelper = ScheduleHelper.getInstance();
ScheduledRecording scheduledRecording = scheduleHelper.SheduleRecording(program.getChannel OID(), program.getStartTime(), program.getEndTime(), program, GBPVR.Public.ScheduledRecording.TYPE_RECORD_ONCE, GBPVR.Public.ScheduledRecording.GROUP_NONE, null);
scheduledRecording.setQualitySetting(quality);

I can set the Quality, but I don't see an easy way to update an existing ScheduledRecording in the database, short of canceling it and then rescheduling it (which would miss my Quality Setting because scheduleHelper.ScheduleRecording() doesn't accept a quality parameter.

I'd like to give the optin on Manage recordings, to change the Quality setting a scheduled recording has through the Web UI.

sub
2004-11-15, 04:53 AM
You'll be able to use this API to do this in the next release.

PVR(SWE)
2004-11-15, 02:52 PM
When will the next release come?
It's like waiting for X-mas:)

sub
2004-11-15, 03:07 PM
Hopefully in about a week.

jorm
2004-11-16, 01:40 PM
Will this modification allow us to update the pre/post padding of a scheduled program too?

sub
2004-11-16, 03:21 PM
yes.

Jeff
2004-11-28, 08:50 PM
I tried using scheduleHelper.UpdateScheduleRecording(thisShow.sc heduledRecording);

And the complier gives the error 'GBPVR.Backend.Common.ScheduleHelper' does not contain a definition for 'UpdateScheduleRecording'

I see that it is defined in the iScheduleHelper interface in GBPVR.Public.

How do I get to the correct version?

Thanks

Jeff

sub
2004-11-28, 09:09 PM
Are you definitely referencing the version GBPVRBackendCommon.dll that came with the newest release of GB-PVR?

alibert
2005-04-27, 04:18 PM
Hi,

I have also played around with the ScheduleHelper class, and I can't find the "UpdateScheduleRecording"-method, too.

"SheduleRecording" works fine, but I can't adjust the pre- and postpadding attibutes. As a workaround, I'm directly accessing the database, but it would be much easier with a "UpdateScheduleRecording".

I'm using the latest versions of both GBPVR.Public and GBPVR.Backend.Common.

-alibert

KingArgyle
2005-04-27, 05:33 PM
Alilbert, you need to use the ISheduleRecording interface, instead of the SheduleRecording class. The UpdateScheduledRecording method is there.

Something like

ISheduleRecording scheduledRecording = new SheduledRecording()

should work.

alibert
2005-04-28, 06:47 AM
Thanks a lot KingArgyle, i got it to work with this code:



IScheduleHelper sh = ScheduleHelper.getInstance();

ScheduledRecording recording = sh.SheduleRecording(
program.getChannelOID(),
program.getStartTime(),
program.getEndTime(),
program,
GBPVR.Public.ScheduledRecording.TYPE_RECORD_ONCE,
GBPVR.Public.ScheduledRecording.GROUP_ALLOCATE,
"");
recording.setPrePadMinutes(prePadding);
recording.setPostPadMinutes(postPadding);
recording.setQualitySetting(GBPVR.Public.Scheduled Recording.QUALITY_HIGH);
sh.UpdateScheduledRecording(recording);


One more question:
What does "GROUP_ALLOCATE" mean? Will it try to put the recording in a group or create a group in the recordings when it is the only show with the same title?

-alibert