Hey guys,
Just wanted to drop you a line to let you know the latest release (buidl1115) of ServerWMC includes options for running external programs in relation to recording events. These need to be configured in the %ProgramData%\VDSoftware\ServerWMC\config.xml file as there is no GUI editor for them.
You can respond to any recording state change as per the microsoft ScheduleEventStates enumeration. Mostly you will be interested in recordings completing (HasOccured), but you can also hook into recordings being scheduled (WillOccur), starting (IsOccuring), being cancelled, deleted, and others). The recording states are listed here:
http://msdn.microsoft.com/en-us/library/...89576.aspx
You can define as many external actions as you want - The external action specifies the trigger status, the program to run and the argument string to feed it. The argument string supports parameter replacement of several key fields from the recording that can be passed to your external program. The parameters supported are:
%Title%
%ServiceID%
%ChannelID%
%OriginalAirDate%
%Repeat%
%Genre%
%FileName%
%RecordingState%
%StartTime%
%EndTime%
Bringing this all together, you would flesh out the <RecordingExternalActions /> section of the XML config file to something like the following
Code:
<RecordingExternalActions>
<ExternalAction>
<RecordingState>HasOccurred</RecordingState>
<Program>c:\myprogram.bat</Program>
<Arguments>/file:"%FileName%" /channel:"%ChannelID%" /genre:%Genre%</Arguments>
</ExternalAction>
</RecordingExternalActions>
This would run the myprogram.bat whenever a recording finishes, and pass it the filename of the completed recording file, the channel and genre. Note that you can have as many <ExternalAction> nodes defined as you want
You also need to enable these recording external actions by modifying this key to true:
Code:
<RecordingExternalActionEnabled>true</RecordingExternalActionEnabled>
If you need to, you can control how the date parameters are formatted on your system with this entry:
Code:
<RecordingExternalActionDateFormat>YYYY-MM-dd HH:mm:ss</RecordingExternalActionDateFormat>
Also there is a debug option to log whenever recording state changes occur to the ServerWMC log, mostly for when I was developing it but it can also be useful for troubleshooting
Code:
<Debug_LogRecordingStatusChanges>true</Debug_LogRecordingStatusChanges>
Finally, please be aware that I dont run comskip or any post processing tasks personally, so I have only been able to do basic testing... Please consider this functionality is preview/work in progress and ideally the guys who wanted it will be able to test it more thoroughly and report back with any issues when run in a "real setup".
edit: fix name of XML tag to "RecordingExternalActions" - sorry exodus454!