home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
WebService and Mobile Access
TV4Home - WCF Webservice for MediaPortal TV Server
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mpolan" data-source="post: 751286" data-attributes="member: 110519"><p>Hi again Mike:</p><p></p><p>I seem to be moving along well using this service. I'm having a little trouble with canceling scheduled recordings (when the schedule is not "once'. I think there might be a bug here in the ITVEInteraction service below. The line</p><p>[CODE] new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, schedule.StartTime);[/CODE]</p><p>I think should be:</p><p>[CODE] new CanceledSchedule(schedule.IdSchedule, program.IdChannel, program.StartTime);[/CODE]</p><p>Do I have it right? (I'm probably not putting this in the right place, let me know if I should post elsewhere).</p><p></p><p>[CODE] public void CancelSchedule(int programId)</p><p> {</p><p> Program program = Program.Retrieve(programId);</p><p></p><p> foreach (Schedule schedule in Schedule.ListAll().Where(schedule => schedule.IsRecordingProgram(program, true)))</p><p> {</p><p> switch (schedule.ScheduleType)</p><p> {</p><p> case (int)ScheduleRecordingType.Once:</p><p> schedule.Delete();</p><p> _tvControl.OnNewSchedule();</p><p> break;</p><p> default:</p><p> CanceledSchedule canceledSchedule = new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, schedule.StartTime);</p><p> canceledSchedule.Persist();</p><p> _tvControl.OnNewSchedule();</p><p> break;</p><p> }</p><p> }</p><p> }[/CODE]</p></blockquote><p></p>
[QUOTE="mpolan, post: 751286, member: 110519"] Hi again Mike: I seem to be moving along well using this service. I'm having a little trouble with canceling scheduled recordings (when the schedule is not "once'. I think there might be a bug here in the ITVEInteraction service below. The line [CODE] new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, schedule.StartTime);[/CODE] I think should be: [CODE] new CanceledSchedule(schedule.IdSchedule, program.IdChannel, program.StartTime);[/CODE] Do I have it right? (I'm probably not putting this in the right place, let me know if I should post elsewhere). [CODE] public void CancelSchedule(int programId) { Program program = Program.Retrieve(programId); foreach (Schedule schedule in Schedule.ListAll().Where(schedule => schedule.IsRecordingProgram(program, true))) { switch (schedule.ScheduleType) { case (int)ScheduleRecordingType.Once: schedule.Delete(); _tvControl.OnNewSchedule(); break; default: CanceledSchedule canceledSchedule = new CanceledSchedule(schedule.IdSchedule, schedule.IdChannel, schedule.StartTime); canceledSchedule.Persist(); _tvControl.OnNewSchedule(); break; } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
WebService and Mobile Access
TV4Home - WCF Webservice for MediaPortal TV Server
Contact us
RSS
Top
Bottom