From 61c94f8a49056e720bdaeeab0e87f210ea958490 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Thu, 12 Oct 2017 16:00:06 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30611 --- .../configuration-control.json | 4 +- .../configuration-ingest.json | 2 +- .../Configuration/configuration-ingest2.json | 80 +++++++++++++++++++ .../configuration-playout.json | 6 +- client/Maestro/Maestro.csproj | 9 ++- client/Maestro/Program.cs | 2 +- client/Maestro/Targets/FXPTargetProcessor.cs | 14 +++- 7 files changed, 103 insertions(+), 14 deletions(-) rename client/Maestro/{Resources => Configuration}/configuration-control.json (89%) rename client/Maestro/{Resources => Configuration}/configuration-ingest.json (92%) create mode 100644 client/Maestro/Configuration/configuration-ingest2.json rename client/Maestro/{Resources => Configuration}/configuration-playout.json (88%) diff --git a/client/Maestro/Resources/configuration-control.json b/client/Maestro/Configuration/configuration-control.json similarity index 89% rename from client/Maestro/Resources/configuration-control.json rename to client/Maestro/Configuration/configuration-control.json index 0c74a654..e232a942 100644 --- a/client/Maestro/Resources/configuration-control.json +++ b/client/Maestro/Configuration/configuration-control.json @@ -12,7 +12,7 @@ "address": "ws://10.10.1.28/services/nexio" }, "remote": { - "address": "ftp://10.10.1.56:2098/MXF", + "address": "ftp://10.10.1.56:2098", "userName": "administrator", "password": "system" } @@ -49,7 +49,7 @@ "outputFormat": "%ID%", "tag": "Adáskész", "remote": { - "address": "ftp://10.10.1.100:21/PLAYOUT_CHECK", + "address": "ftp://10.10.1.100:21/PLAYOUT_CHECK1", "userName": "mediacube", "password": "Broadca5T" } diff --git a/client/Maestro/Resources/configuration-ingest.json b/client/Maestro/Configuration/configuration-ingest.json similarity index 92% rename from client/Maestro/Resources/configuration-ingest.json rename to client/Maestro/Configuration/configuration-ingest.json index cb371883..196bf694 100644 --- a/client/Maestro/Resources/configuration-ingest.json +++ b/client/Maestro/Configuration/configuration-ingest.json @@ -61,7 +61,7 @@ "tag": "Betöltés", "killDateDays": 7, "remote": { - "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK", + "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK1", "timeout": 1000 } }, diff --git a/client/Maestro/Configuration/configuration-ingest2.json b/client/Maestro/Configuration/configuration-ingest2.json new file mode 100644 index 00000000..f9eed359 --- /dev/null +++ b/client/Maestro/Configuration/configuration-ingest2.json @@ -0,0 +1,80 @@ +{ + "title": "Betöltés", + "active": true, + "startInTray": false, + "enableCustomMetadataId": true, + "player": { + "enabled": true, + "autoStart": false, + "segmentEditor": true + }, + "source": { + "$type": "UNCSource", + "filter": "avi,wav,mxf", + "local": { + "address": "file://c:/x" + } + }, + "metadatas": [ + { + "$type": "OctopusMetadata", + "server": { + "address": "http://10.10.1.28/services/rest/octopus/", + "timeout": 1000 + } + }, + { + "$type": "TrafficMetadata", + "server": { + "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", + "userName": "MAM", + "password": "Echotv.hu", + "timeout": 1000 + } + }, + { + "$type": "MediaCubeMetadata", + "server": { + "address": "http://10.10.1.28/services/rest/jobengine/", + "timeout": 1000 + } + } + ], + "targets": [ + { + "label": "Híranyag betöltés", + "processor": "UNCTargetProcessor", + "outputFormat": "%ID%-%SOURCENAME%", + "tag": "Betöltés", + "createSubFolder": true, + "killDateDays": 7, + "useMetadata": false, + "remote": { + "address": "file://10.10.1.100/BRAAVOS/OCTOPUS", + "timeout": 1000 + } + }, + { + "label": "Adásanyag betöltés", + "processor": "UNCTargetProcessor", + "outputFormat": "%ID%", + "tag": "Betöltés", + "killDateDays": 7, + "remote": { + "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK", + "timeout": 1000 + } + }, + { + "label": "Archiválás", + "processor": "UNCTargetProcessor", + "outputFormat": "%ID%", + "tag": "Archiválás", + "useMetadata": true, + "remote": { + "address": "file://10.10.1.100/BRAAVOS/ARCHIVE", + "timeout": 1000 + } + } + ] +} diff --git a/client/Maestro/Resources/configuration-playout.json b/client/Maestro/Configuration/configuration-playout.json similarity index 88% rename from client/Maestro/Resources/configuration-playout.json rename to client/Maestro/Configuration/configuration-playout.json index f6a3ca39..fa5e1cb1 100644 --- a/client/Maestro/Resources/configuration-playout.json +++ b/client/Maestro/Configuration/configuration-playout.json @@ -6,7 +6,7 @@ "player": { "enabled": true, "autoStart": false, - "segmentEditor": false + "segmentEditor": true }, "source": { "$type": "UNCSource", @@ -47,7 +47,7 @@ "saveSegments": true, "tag": "Adáskész", "remote": { - "address": "file://10.10.1.100/BRAAVOS/PLAYOUT" + "address": "file://10.10.1.100/BRAAVOS/PLAYOUT/IceGateway" } }, { @@ -56,7 +56,7 @@ "outputFormat": "%ID%", "tag": "Újravágás", "remote": { - "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_NLE" + "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_NLE1" }, "sendSEmailOnSuccess" : true, "successEmailRecipient": "vasary@elgekko.net", diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index 6168d62d..89dd49a8 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -255,6 +255,9 @@ Form + + PreserveNewest + PreserveNewest @@ -279,16 +282,16 @@ PreserveNewest - + PreserveNewest PreserveNewest - + PreserveNewest - + PreserveNewest diff --git a/client/Maestro/Program.cs b/client/Maestro/Program.cs index a1e83143..718fcd0a 100644 --- a/client/Maestro/Program.cs +++ b/client/Maestro/Program.cs @@ -46,7 +46,7 @@ namespace Maestro { } private void CreateForms() { - string[] files = Directory.GetFiles("./Resources", "*.json"); + string[] files = Directory.GetFiles("./Configuration", "*.json"); if (files.Length == 0) { MessageBox.Show("Hiányos konfiguráció!"); Application.Exit(); diff --git a/client/Maestro/Targets/FXPTargetProcessor.cs b/client/Maestro/Targets/FXPTargetProcessor.cs index 69780a78..5c715a0a 100644 --- a/client/Maestro/Targets/FXPTargetProcessor.cs +++ b/client/Maestro/Targets/FXPTargetProcessor.cs @@ -27,7 +27,7 @@ namespace Maestro.Targets { try { sourceFTP = CreateClient(sourceConfig.Remote); - long ilength = sourceFTP.GetFileSize(inputUri.AbsolutePath); + long ilength = sourceFTP.GetFileSize(inputUri.AbsolutePath) / 2; FtpReply replyPASV = targetFTP.Execute("PASV"); if (!replyPASV.Success) @@ -46,7 +46,7 @@ namespace Maestro.Targets { if (!sourceReplyTYPE.Success) throw new Exception(sourceReplyTYPE.ErrorMessage); - FtpReply replyRETR = sourceFTP.Execute("RETR " + inputUri.AbsolutePath); + FtpReply replyRETR = sourceFTP.Execute("RETR " + inputUri.AbsolutePath.Replace("/", "")); if (!replyRETR.Success) { replyRETR = sourceFTP.Execute("RETR " + inputUri.Segments[inputUri.Segments.Length - 1]); @@ -70,10 +70,16 @@ namespace Maestro.Targets { if (!monitorFTP.FileExists(OutputName)) throw new Exception("A cél állomány nem jött létre."); long overall = 0; + long lastSize = 0; while (overall != ilength) { overall = monitorFTP.GetFileSize(OutputName); - Progress = (int)((double)overall / ilength * 100); - Thread.Sleep(100); + if (overall == lastSize) { + Progress = 100; + break; + } else { + Progress = (int)((double)overall / ilength * 100); + } + Thread.Sleep(300); } } -- 2.54.0