},\r
OutputFormat = "{0}_{1}_{2}"\r
};\r
- TargetProcessorParametersWrapper parameters = new TargetProcessorParametersWrapper() {\r
+ TargetProcessorParameter parameters = new TargetProcessorParameter() {\r
SourceConfig = null,\r
TargetConfig = configuration,\r
InputFileName = @"c:\tmp\watch\tcdrone.MXF",\r
<None Include="Resources\configuration-fxp.json">\r
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
</None>\r
+ <None Include="Resources\configuration-playout.json">\r
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
+ </None>\r
<None Include="Resources\configuration-unc.json">\r
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
</None>\r
\r
namespace Maestro {\r
\r
- public class TargetProcessorParametersWrapper {\r
+ public class TargetProcessorParameter {\r
public Source SourceConfig { get; set; }\r
public Target TargetConfig { get; set; }\r
public string InputFileName { get; set; }\r
string fileName = actualRow.Cells[1].Value as string;\r
string typeName = string.Format("{0}.{1}", typeof(ITargetProcessor).Namespace, target.Processor);\r
Type type = Type.GetType(typeName);\r
- int variantID = selectedMetadata.VariantID;\r
- TrafficAPI api = trafficIDSelector.trafficAPI;\r
- ISourceItem selectedFile = GetSourceItemFromBindingSource(fileName);//bindingSource.Current as ISourceItem;\r
+ ISourceItem selectedFile = GetSourceItemFromBindingSource(fileName);\r
string id = selectedMetadata == null ? textSelectedMetadata.Text : selectedMetadata.ID;\r
- ArchiveMetadata archiveMetadataClone = ArchiveMetadata.DeepClone(archiveMetadatamodel);\r
- List<Segment> segmentsClone = new List<Segment>(segments);\r
- TargetProcessorParametersWrapper parameterObj = new TargetProcessorParametersWrapper() {\r
- ArchiveMetadata = archiveMetadataClone,\r
- Client = api,\r
+ TargetProcessorParameter processorParameter = new TargetProcessorParameter() {\r
+ ArchiveMetadata = ArchiveMetadata.DeepClone(archiveMetadatamodel),\r
+ Client = trafficIDSelector.trafficAPI,\r
ID = id,\r
InputFileName = selectedFile.Name,\r
MediaCubeApi = mediaCubeApi,\r
- Segments = segmentsClone,\r
+ Segments = new List<Segment>(segments),\r
SourceConfig = Configuration.Source,\r
TargetConfig = target,\r
- VariantID = variantID\r
+ VariantID = selectedMetadata == null ? 0 : selectedMetadata.VariantID\r
};\r
- object[] parameters = new object[] { this, parameterObj };\r
+ object[] parameters = new object[] { this, processorParameter };\r
ITargetProcessor processor = (ITargetProcessor)Activator.CreateInstance(type, parameters);\r
processors.Add(processor);\r
}\r
}\r
\r
public static ArchiveMetadata DeepClone(ArchiveMetadata obj) {\r
+ if (obj == null)\r
+ return null;\r
using (var ms = new MemoryStream()) {\r
var formatter = new BinaryFormatter();\r
formatter.Serialize(ms, obj);\r
ms.Position = 0;\r
-\r
return (ArchiveMetadata)formatter.Deserialize(ms);\r
}\r
}\r
--- /dev/null
+{\r
+ "title": "Adásanyagok",\r
+ "active": true,\r
+ "startInTray": false,\r
+ "enableCustomMetadataId": true,\r
+ "player": {\r
+ "enabled": true,\r
+ "autoStart": false,\r
+ "segmentEditor": false\r
+ },\r
+ "source": {\r
+ "$type": "UNCSource",\r
+ "local": {\r
+ "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK"\r
+ }\r
+ },\r
+ "metadatas": [\r
+ {\r
+ "$type": "OctopusMetadata",\r
+ "server": {\r
+ "address": "http://10.10.1.28/services/rest/octopus/",\r
+ "timeout": 1000\r
+ }\r
+ },\r
+ {\r
+ "$type": "TrafficMetadata",\r
+ "server": {\r
+ "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;",\r
+ "userName": "MAM",\r
+ "password": "Echotv.hu",\r
+ "timeout": 0\r
+ }\r
+ },\r
+ {\r
+ "$type": "MediaCubeMetadata",\r
+ "server": {\r
+ "address": "http://10.10.1.28/services/rest/jobengine/",\r
+ "timeout": 1000\r
+ }\r
+ }\r
+ ],\r
+ "targets": [\r
+ {\r
+ "label": "Adáskész",\r
+ "processor": "UNCTargetProcessor",\r
+ "outputFormat": "%ID%",\r
+ "saveSegments": true,\r
+ "tag": "Adáskész",\r
+ "createSubFolder": false,\r
+ "useMetadata": false,\r
+ "remote": {\r
+ "address": "file://10.10.1.100/BRAAVOS/PLAYOUT"\r
+ }\r
+ },\r
+ {\r
+ "label": "Újravágásra",\r
+ "processor": "UNCTargetProcessor",\r
+ "outputFormat": "%ID%",\r
+ "tag": "Újravágásra",\r
+ "remote": {\r
+ "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_NLE"\r
+ }\r
+ }\r
+\r
+ ]\r
+}\r
private readonly Logger logger = LogManager.GetCurrentClassLogger();\r
protected FtpClient targetFTP;\r
\r
- public FTPTargetProcessor(Control parent, TargetProcessorParametersWrapper parameters)\r
+ public FTPTargetProcessor(Control parent, TargetProcessorParameter parameters)\r
: base(parent, parameters) {\r
FtpTrace.LogFunctions = false;\r
if (!(parameters.SourceConfig is UNCSource)) {\r
private Source sourceConfig;\r
Uri inputUri;\r
\r
- public FXPTargetProcessor(Control parent,TargetProcessorParametersWrapper parameters) :\r
+ public FXPTargetProcessor(Control parent,TargetProcessorParameter parameters) :\r
base(parent, parameters) {\r
sourceConfig = parameters.SourceConfig;\r
inputUri = new Uri(String.Format("{0}/{1}", parameters.SourceConfig.Remote.Address, parameters.InputFileName));\r
private const string DEFAULT_EXTENSION = ".mxf";\r
protected FileInfo inputFile;\r
protected string workingDir;\r
- protected TargetProcessorParametersWrapper parameters;\r
+ protected TargetProcessorParameter parameters;\r
\r
public WorkflowAction workFlowAction { get; set; }\r
\r
- public UNCTargetProcessor(Control parent, TargetProcessorParametersWrapper parameters)\r
+ public UNCTargetProcessor(Control parent, TargetProcessorParameter parameters)\r
: base(parent) {\r
this.parameters = parameters;\r
InputName = parameters.InputFileName;\r
UploadKillDateFile();\r
if (parameters.TargetConfig.UseMetadata && parameters.ArchiveMetadata != null)\r
CreateMetadata();\r
- if (parameters.TargetConfig.SaveSegments && parameters.Segments != null)\r
+ if (parameters.TargetConfig.SaveSegments && parameters.Segments != null) {\r
SaveSegments();\r
- parameters.Client.BroadcastOKForAir(parameters.VariantID);\r
+ parameters.Client.BroadcastOKForAir(parameters.VariantID);\r
+ } \r
}\r
\r
private void SaveSegments() {\r
private SegmentWorker segmentWorker;\r
\r
public TrafficAPI(string connString, string user, string password, int timeout, TrafficErrorReporterDelegate errorReporter) {\r
- connectionString = String.Format("{0};User ID={1};Password={2};Connection Timeout={3}", connString, user, password, timeout);\r
+ connectionString = String.Format("{0};User ID={1};Password={2};Connection Timeout={3}", connString, user, password, timeout/1000);\r
connection = new SqlConnection(connectionString);\r
cliFSPReader = new CliFSPReader();\r
broadvastWorker = new BroadcastWorker(connection, cliFSPReader, errorReporter);\r
+<link rel="shortcut icon" href="img/mediacube_logo_small.ico">\r
<%\r
pageContext.forward("/pages/login.jsp");\r
//response.sendRedirect("/pages/login.jsp");\r