I am trying to build a simple record button in my MCML application that will record a program, using the program title that is typed in a textfield.
I am using the AddInHost.Current.MediaCenterEnvironment.TVSchedule.ScheduleRecording(). My Click-To-Record XML file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<clickToRecord xmlns="urn:schemas-microsoft-com:ehome:clicktorecord">
<body>
<metadata>
<description>Record program</description>
</metadata>
<programRecord prepadding="-300" postpadding="300" allowAlternateAirings="true">
<program>
<key field="urn:schemas-microsoft-com:ehome:epg:program#title" match="exact">" + ProgramTitle + "</key>
</program>
<airing searchSpan="180">
<key field="urn:schemas-microsoft-com:ehome:epg:airing#starttime">2006-06-13T13:55:00Z</key>
</airing>
</programRecord>
</body>
</clickToRecord>
Where ProgramTitle is the string I get withing the C# function, with the content of my textbox. When I try to run this from within MCE (after I have installed my application), I get the error message that the schedule request is invalid. I have no way of debugging so all I know is that it does not work, however I can't figure out why.
I have based my XML document on the MSDN resource:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/MedctrSDK/htm/clicktorecordclass.asp
Can anyone please help me?