git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 10 Oct 2017 09:43:11 +0000 (09:43 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 10 Oct 2017 09:43:11 +0000 (09:43 +0000)
client/Maestro/Maestro.csproj
client/Maestro/Resources/configuration-fxp-isilon.json [new file with mode: 0644]
client/Maestro/Resources/configuration-fxp.json [new file with mode: 0644]
client/Maestro/Resources/configuration-ingest - Copy.json [new file with mode: 0644]
client/Maestro/Resources/configuration-ingest.json [new file with mode: 0644]
client/Maestro/Resources/configuration-nexio.json
client/Maestro/Resources/configuration-unc.json
client/Maestro/Sources/NexioRESTSource.cs
client/Maestro/Targets/FTPTargetProcessor.cs
client/Maestro/Targets/FXPTargetProcessor.cs
client/Maestro/Targets/UNCTargetProcessor.cs

index a6f2da8f1a9dbd4571dc4de86d9029bb5dc4c3c3..48484cd1ba32e45bb211337f03856288466e84da 100644 (file)
     <UpdateRequired>false</UpdateRequired>\r
     <MapFileExtensions>true</MapFileExtensions>\r
     <InstallUrl>http://10.10.1.28:90/clientinstall/</InstallUrl>\r
+    <ProductName>Maestro</ProductName>\r
+    <PublisherName>USER Rendszerház Kft.</PublisherName>\r
+    <SuiteName>MediaCube</SuiteName>\r
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>\r
     <WebPage>index.htm</WebPage>\r
-    <ApplicationRevision>3</ApplicationRevision>\r
-    <ApplicationVersion>1.9.0.3</ApplicationVersion>\r
+    <ApplicationRevision>0</ApplicationRevision>\r
+    <ApplicationVersion>1.9.0.0</ApplicationVersion>\r
     <UseApplicationTrust>false</UseApplicationTrust>\r
     <CreateDesktopShortcut>true</CreateDesktopShortcut>\r
     <PublishWizardCompleted>true</PublishWizardCompleted>\r
       <DependentUpon>Settings.settings</DependentUpon>\r
       <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
     </Compile>\r
+    <None Include="Resources\configuration-fxp-isilon.json">\r
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
+    </None>\r
+    <None Include="Resources\configuration-fxp.json">\r
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
+    </None>\r
+    <None Include="Resources\configuration-ingest - Copy.json">\r
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
+    </None>\r
     <None Include="Resources\configuration-unc.json">\r
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
     </None>\r
+    <None Include="Resources\configuration-ingest.json">\r
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
+    </None>\r
     <None Include="Resources\configuration-nexio.json">\r
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
     </None>\r
diff --git a/client/Maestro/Resources/configuration-fxp-isilon.json b/client/Maestro/Resources/configuration-fxp-isilon.json
new file mode 100644 (file)
index 0000000..c5da359
--- /dev/null
@@ -0,0 +1,62 @@
+{\r
+  "title": "Adáslebonyolítás",\r
+  "active": false,\r
+  "startInTray": false,\r
+  "enableNameOverride": false,\r
+  "player": {\r
+    "enabled": true,\r
+    "autoStart": false,\r
+    "segmentEditor": true\r
+  },\r
+  "source": {\r
+    "$type": "UNCSource",\r
+    "local": {\r
+      "address": "file://localhost/watch"\r
+    },\r
+    "remote": {\r
+      "address": "ftp://localhost:21/watch",\r
+      "userName": "dani",\r
+      "password": "dani"\r
+    }\r
+  },\r
+  "metadatas": [\r
+    {\r
+      "$type": "OctopusMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/octopus",\r
+        "userName": "dani",\r
+        "password": "dani",\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": 5\r
+      }\r
+    },\r
+    {\r
+      "$type": "MediaCubeMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/jobengine",\r
+        "userName": "dani",\r
+        "password": "dani"\r
+      }\r
+    }\r
+  ],\r
+  "targets": [\r
+    {\r
+      "label": "Adásba",\r
+      "processor": "FXPTargetProcessor",\r
+      "outputFormat": "%ID%",\r
+      "remote": {\r
+        "address": "ftp://10.10.1.100:21/READY",\r
+        "userName": "mediacube",\r
+        "password": "Broadca5T"\r
+      }\r
+    }\r
+  ]\r
+}\r
diff --git a/client/Maestro/Resources/configuration-fxp.json b/client/Maestro/Resources/configuration-fxp.json
new file mode 100644 (file)
index 0000000..6077a55
--- /dev/null
@@ -0,0 +1,62 @@
+{\r
+  "title": "Adáslebonyolítás",\r
+  "active": false,\r
+  "startInTray": false,\r
+  "enableNameOverride": false,\r
+  "player": {\r
+    "enabled": true,\r
+    "autoStart": false,\r
+    "segmentEditor": true\r
+  },\r
+  "source": {\r
+    "$type": "UNCSource",\r
+    "local": {\r
+      "address": "file://localhost/watch"\r
+    },\r
+    "remote": {\r
+      "address": "ftp://localhost:21/watch",\r
+      "userName": "dani",\r
+      "password": "dani"\r
+    }\r
+  },\r
+  "metadatas": [\r
+    {\r
+      "$type": "OctopusMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/octopus",\r
+        "userName": "dani",\r
+        "password": "dani",\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": 5\r
+      }\r
+    },\r
+    {\r
+      "$type": "MediaCubeMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/jobengine",\r
+        "userName": "dani",\r
+        "password": "dani"\r
+      }\r
+    }\r
+  ],\r
+  "targets": [\r
+    {\r
+      "label": "Adásba",\r
+      "processor": "FXPTargetProcessor",\r
+      "outputFormat": "%ID%",\r
+      "remote": {\r
+        "address": "ftp://localhost:22/out",\r
+        "userName": "dani",\r
+        "password": "dani"\r
+      }\r
+    }\r
+  ]\r
+}\r
diff --git a/client/Maestro/Resources/configuration-ingest - Copy.json b/client/Maestro/Resources/configuration-ingest - Copy.json
new file mode 100644 (file)
index 0000000..d382eb3
--- /dev/null
@@ -0,0 +1,77 @@
+{\r
+  "title": "Betöltés",\r
+  "active": true,\r
+  "startInTray": false,\r
+  "enableCustomMetadataId": false,\r
+  "player": {\r
+    "enabled": true,\r
+    "autoStart": false,\r
+    "segmentEditor": false\r
+  },\r
+  "source": {\r
+    "$type": "UNCSource",\r
+    "local": {\r
+      "address": "file://c:\\_video\\v\\sxs\\xdroot\\clip"\r
+    }\r
+  },\r
+  "metadatas": [\r
+    {\r
+      "$type": "OctopusMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/octopus/",\r
+        "userName": "user",\r
+        "password": "password",\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": 5\r
+      }\r
+    },\r
+    {\r
+      "$type": "MediaCubeMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/jobengine/",\r
+        "userName": "user",\r
+        "password": "password",\r
+        "timeout": 1000\r
+      }\r
+    }\r
+  ],\r
+  "targets": [\r
+    {\r
+      "label": "Híranyag betöltés",\r
+      "processor": "UNCTargetProcessor",\r
+      "outputFormat": "%ID%-%SOURCENAME%",\r
+      "tag": "Betöltés",\r
+      "createSubFolder": true,\r
+      "killDateDays": 7,\r
+      "useMetadata": false,\r
+      "remote": {\r
+        "address": "file://10.10.1.100/BRAAVOS/ARCHIVE",\r
+        "userName": "mediacube",\r
+        "password": "Broadca5T"\r
+      }\r
+    },\r
+    {\r
+      "label": "Adásanyag betöltés",\r
+      "processor": "UNCTargetProcessor",\r
+      "outputFormat": "%ID%",\r
+      "tag": "Betöltés",\r
+      "saveSegments": false,\r
+      "killDateDays": 7,\r
+      "createSubFolder": false,\r
+      "useMetadata": false,\r
+      "remote": {\r
+        "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK",\r
+        "userName": "mediacube",\r
+        "password": "Broadca5T"\r
+      }\r
+    }\r
+  ]\r
+}\r
diff --git a/client/Maestro/Resources/configuration-ingest.json b/client/Maestro/Resources/configuration-ingest.json
new file mode 100644 (file)
index 0000000..afef402
--- /dev/null
@@ -0,0 +1,78 @@
+{\r
+  "title": "Betöltés",\r
+  "active": true,\r
+  "startInTray": false,\r
+  "enableCustomMetadataId": false,\r
+  "player": {\r
+    "enabled": true,\r
+    "autoStart": false,\r
+    "segmentEditor": false\r
+  },\r
+  "source": {\r
+    "$type": "UNCSource",\r
+    "filter": "avi,wav,mxf",\r
+    "local": {\r
+      "address": "file://c:\\_video\\v\\sxs\\xdroot\\clip"\r
+    }\r
+  },\r
+  "metadatas": [\r
+    {\r
+      "$type": "OctopusMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/octopus/",\r
+        "userName": "user",\r
+        "password": "password",\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": 5\r
+      }\r
+    },\r
+    {\r
+      "$type": "MediaCubeMetadata",\r
+      "server": {\r
+        "address": "http://10.10.1.28:8080/services/rest/jobengine/",\r
+        "userName": "user",\r
+        "password": "password",\r
+        "timeout": 1000\r
+      }\r
+    }\r
+  ],\r
+  "targets": [\r
+    {\r
+      "label": "Híranyag betöltés",\r
+      "processor": "UNCTargetProcessor",\r
+      "outputFormat": "%ID%-%SOURCENAME%",\r
+      "tag": "Betöltés",\r
+      "createSubFolder": true,\r
+      "killDateDays": 7,\r
+      "useMetadata": false,\r
+      "remote": {\r
+        "address": "file://10.10.1.100/BRAAVOS/ARCHIVE",\r
+        "userName": "mediacube",\r
+        "password": "Broadca5T"\r
+      }\r
+    },\r
+    {\r
+      "label": "Adásanyag betöltés",\r
+      "processor": "UNCTargetProcessor",\r
+      "outputFormat": "%ID%",\r
+      "tag": "Betöltés",\r
+      "saveSegments": false,\r
+      "killDateDays": 7,\r
+      "createSubFolder": false,\r
+      "useMetadata": false,\r
+      "remote": {\r
+        "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK",\r
+        "userName": "mediacube",\r
+        "password": "Broadca5T"\r
+      }\r
+    }\r
+  ]\r
+}\r
index 0ac702f2176932239c719d93b8b7afb1aeab8f65..f0a69cb46010ac893e843f5e90c4c5519f4eaf79 100644 (file)
@@ -1,6 +1,6 @@
 {\r
-  "title": "PLAYOUT",\r
-  "active": true,\r
+  "title": "Adáslebonyolítás",\r
+  "active": false,\r
   "startInTray": false,\r
   "enableNameOverride": false,\r
   "filter": "avi",\r
index 2d40e58210ddf0f17e58b6fe0f692dc48c3afe9c..f9c9112f2b46019f3a235df93b7b224d4f239489 100644 (file)
@@ -1,17 +1,15 @@
 {\r
   "title": "INGEST",\r
-  "active": true,\r
+  "active": false,\r
   "startInTray": false,\r
-  "enableNameOverride": false,\r
   "enableCustomMetadataId": true,\r
   "player": {\r
     "enabled": true,\r
     "autoStart": false,\r
-    "segmentEditor": true\r
+    "segmentEditor": false\r
   },\r
   "source": {\r
     "$type": "UNCSource",\r
-       "filter": "avi,wav,mxf",\r
     "local": {\r
       "address": "file://10.10.1.100/BRAAVOS/_TEST_/_ECHO/hirado/test"\r
     },\r
index ad86398c49d6a313eac93f20456c6323fbdeabcf..5f15d6de713b23e80bc6531d05439fdc759c6370 100644 (file)
@@ -130,7 +130,7 @@ namespace Maestro.Sources {
 \r
         private void SetItem(ref NexioSourceItem item, JToken token) {\r
             item.ID = token[ID].ToString();\r
-            item.Name = token[LONGNAMEID].ToString();\r
+            item.Name = token[LONGNAMEID].ToString() + ".mxf";\r
             //item.Created = DateTime.Parse(token[RECORDDATE].ToString());\r
             item.Agency = token[EXTAGENCY].ToString();\r
             item.Modified = DateTime.Parse(token[MODIFIED].ToString());\r
index 35a50856a6ba8e523bf1f48f4ee16e50513df686..73685440f6cbfa51ca5d1565b3f5670d25e3548a 100644 (file)
@@ -16,15 +16,11 @@ namespace Maestro.Targets {
         public FTPTargetProcessor(Control parent, TargetProcessorParametersWrapper parameters)\r
             : base(parent, parameters) {\r
             FtpTrace.LogFunctions = false;\r
-            Uri inputUri = createInputUri(parameters);\r
-            inputFile = new FileInfo(inputUri.LocalPath);\r
-            Input = inputFile.FullName;\r
-            ID = parameters.ID;\r
-            workFlowAction = new WorkflowAction() { houseId = ID, tag = parameters.TargetConfig.Tag, touched = DateTime.Now };\r
-        }\r
-\r
-        protected virtual Uri createInputUri(TargetProcessorParametersWrapper parameters) {\r
-            return new Uri(String.Format("{0}/{1}", parameters.SourceConfig.Local.Address.LocalPath, parameters.InputFileName));\r
+            if (!(parameters.SourceConfig is UNCSource)) {\r
+                inputFile = null;\r
+                Uri inputUri = new Uri(String.Format("{0}{1}", parameters.SourceConfig.Remote.Address, parameters.InputFileName));\r
+                Input = inputUri.ToString();\r
+            }\r
         }\r
 \r
         protected override void BeforeExecute() {\r
index 1032b08e915a47da8b30c2709e4e59adb6828a55..ac53db52628e1de2941dd8bec02b70f234fb9aae 100644 (file)
@@ -11,14 +11,14 @@ namespace Maestro.Targets {
     public class FXPTargetProcessor : FTPTargetProcessor {\r
         private Logger logger = LogManager.GetCurrentClassLogger();\r
         private Source sourceConfig;\r
+        Uri inputUri;\r
 \r
         public FXPTargetProcessor(Control parent,TargetProcessorParametersWrapper parameters) :\r
             base(parent, parameters) {\r
             sourceConfig = parameters.SourceConfig;\r
-        }\r
+            inputUri = new Uri(String.Format("{0}/{1}", parameters.SourceConfig.Remote.Address, parameters.InputFileName));\r
+            Input = inputUri.ToString();\r
 \r
-        protected override Uri createInputUri(TargetProcessorParametersWrapper parameters) {\r
-            return new Uri(String.Format("{0}/{1}", parameters.SourceConfig.Remote.Address, parameters.InputFileName));\r
         }\r
 \r
         protected override void UploadFile() {\r
@@ -27,7 +27,7 @@ namespace Maestro.Targets {
 \r
             try {\r
                 sourceFTP = CreateClient(sourceConfig.Remote);\r
-                long ilength = sourceFTP.GetFileSize(inputFile.Name);\r
+                long ilength = sourceFTP.GetFileSize(inputUri.AbsolutePath);\r
 \r
                 FtpReply replyPASV = targetFTP.Execute("PASV");\r
                 if (!replyPASV.Success)\r
@@ -41,24 +41,34 @@ namespace Maestro.Targets {
                 if (!replyPORT.Success)\r
                     throw new Exception(replyPORT.ErrorMessage);\r
 \r
-                FtpReply replyTYPE = targetFTP.Execute("TYPE I");\r
-                if (!replyTYPE.Success)\r
-                    throw new Exception(replyTYPE.ErrorMessage);\r
+\r
+                FtpReply sourceReplyTYPE = sourceFTP.Execute("TYPE I");\r
+                if (!sourceReplyTYPE.Success)\r
+                    throw new Exception(sourceReplyTYPE.ErrorMessage);\r
+\r
+                FtpReply replyRETR = sourceFTP.Execute("RETR " + inputUri.AbsolutePath);\r
+                if (!replyRETR.Success) {\r
+\r
+                    replyRETR = sourceFTP.Execute("RETR " + inputUri.Segments[inputUri.Segments.Length - 1]);\r
+\r
+                    if (!replyRETR.Success)\r
+                        throw new Exception(replyRETR.ErrorMessage);\r
+                }\r
+\r
+                FtpReply targetReplyTYPE = targetFTP.Execute("TYPE I");\r
+                if (!targetReplyTYPE.Success)\r
+                    throw new Exception(targetReplyTYPE.ErrorMessage);\r
 \r
                 FtpReply replySTOR = targetFTP.Execute("STOR " + OutputName);\r
                 if (!replySTOR.Success)\r
                     throw new Exception(replySTOR.ErrorMessage);\r
 \r
-                replyTYPE = sourceFTP.Execute("TYPE I");\r
-                if (!replyTYPE.Success)\r
-                    throw new Exception(replyTYPE.ErrorMessage);\r
-\r
-                FtpReply replyRETR = sourceFTP.Execute("RETR " + inputFile.Name);\r
-                if (!replyRETR.Success)\r
-                    throw new Exception(replyRETR.ErrorMessage);\r
 \r
                 monitorFTP = CreateClient(parameters.TargetConfig.Remote);\r
-\r
+                monitorFTP.SetWorkingDirectory(workingDir);\r
+                monitorFTP.Execute("TYPE I");\r
+                if (!monitorFTP.FileExists(OutputName))\r
+                    throw new Exception("A cél állomány nem jött létre.");\r
                 long overall = 0;\r
                 while (overall != ilength) {\r
                     overall = monitorFTP.GetFileSize(OutputName);\r
index 34cd43ae8ccfb72b5b4f51772907e2303b9d65cb..d45ed5eaf81a6446f18bb0657b7d15634a359208 100644 (file)
@@ -21,6 +21,7 @@ namespace Maestro.Targets {
         private const string STATUS_FOLDER = ".STATUS";\r
         private const string KILLDATE_FILE = "{0}.{1}.killdate";\r
         private const string METADATA_FILE = "{0}.json";\r
+        private const string DEFAULT_EXTENSION = ".mxf";\r
         protected FileInfo inputFile;\r
         protected string workingDir;\r
         protected TargetProcessorParametersWrapper parameters;\r
@@ -43,7 +44,7 @@ namespace Maestro.Targets {
         }\r
 \r
         public override bool Execute() {\r
-            logger.Info(PROCESSING, inputFile.Name);\r
+            logger.Info(PROCESSING, InputName);\r
             bool result = false;\r
             try {\r
                 BeforeExecute();\r
@@ -66,7 +67,7 @@ namespace Maestro.Targets {
             finally {\r
                 AfterExecute();\r
             }\r
-            logger.Info(PROCESSING_COMPLETED, inputFile.Name);\r
+            logger.Info(PROCESSING_COMPLETED, InputName);\r
             return result;\r
         }\r
 \r
@@ -166,11 +167,13 @@ namespace Maestro.Targets {
         }\r
 \r
         protected virtual string CreateOutputFileName() {\r
-            string nameWithoutExtension = parameters.TargetConfig.OutputFormat.Replace("%ID%", ID).Replace("%SOURCENAME%", Path.GetFileNameWithoutExtension(inputFile.Name));\r
-            string result = String.Format(FILENAME, nameWithoutExtension, inputFile.Extension);\r
+            string nameWithoutExtension = parameters.TargetConfig.OutputFormat.Replace("%ID%", ID).Replace("%SOURCENAME%", Path.GetFileNameWithoutExtension(InputName));\r
+\r
+            string extension = InputName.Contains(".") ? InputName.Substring(InputName.LastIndexOf(".")) : DEFAULT_EXTENSION;\r
+            string result = String.Format(FILENAME, nameWithoutExtension, extension);\r
             int version = 1;\r
             while (FileExists(Path.Combine(workingDir, result))) {\r
-                string versioned = String.Format(VERSIONED_FILENAME, nameWithoutExtension, version, inputFile.Extension);\r
+                string versioned = String.Format(VERSIONED_FILENAME, nameWithoutExtension, version, extension);\r
                 logger.Debug(ALREADY_EXISTS, result, versioned);\r
                 result = versioned;\r
                 version++;\r