}\r
],\r
"targets": [\r
- {\r
- "label": "Nyersanyag betöltés",\r
- "processor": "UNCTargetProcessor",\r
- "outputFormat": "%ID%-%SOURCENAME%",\r
- "tag": "Betöltés",\r
- "createSubFolder": true,\r
- "killDateDays": 7,\r
- "remote": {\r
- "address": "file://10.10.1.100/BRAAVOS/OCTOPUS",\r
- "userName": "mediacube",\r
- "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
- "timeout": 1000\r
- }\r
- },\r
{\r
"label": "Stúdióba küldés",\r
"processor": "FTPTargetProcessor",\r
},\r
{\r
"label": "Hír nyersanyag betöltés",\r
- "processor": "UNCTargetProcessor",\r
+ "processor": "FTPTargetProcessor",\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/OCTOPUS",\r
+ "address": "ftp://10.10.1.100/OCTOPUS",\r
"userName": "mediacube",\r
"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
},\r
{\r
"label": "Magazin nyersanyag betöltés",\r
- "processor": "UNCTargetProcessor",\r
+ "processor": "FTPTargetProcessor",\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/PLAYOUT_NLE",\r
+ "address": "ftp://10.10.1.100/PLAYOUT_NLE",\r
"userName": "mediacube",\r
"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
},\r
{\r
"label": "Lebonyba küldés",\r
- "processor": "UNCTargetProcessor",\r
+ "processor": "FTPTargetProcessor",\r
"outputFormat": "%ID%",\r
"tag": "Betöltés",\r
"killDateDays": 7,\r
"remote": {\r
- "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK",\r
+ "address": "ftp://10.10.1.100/PLAYOUT_CHECK",\r
"userName": "mediacube",\r
"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
},\r
{\r
"label": "Archiválás",\r
- "processor": "UNCTargetProcessor",\r
+ "processor": "FTPTargetProcessor",\r
"outputFormat": "%ID%",\r
"tag": "Archiválás",\r
"useMetadata": true,\r
"remote": {\r
- "address": "file://10.10.1.100/BRAAVOS/ARCHIVE",\r
+ "address": "ftp://10.10.1.100/ARCHIVE",\r
"userName": "mediacube",\r
"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>\r
</PropertyGroup>\r
<ItemGroup>\r
- <Reference Include="FluentFTP, Version=17.5.8.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">\r
- <HintPath>..\packages\FluentFTP.17.5.8\lib\net45\FluentFTP.dll</HintPath>\r
+ <Reference Include="FluentFTP, Version=19.1.1.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">\r
+ <HintPath>..\packages\FluentFTP.19.1.1\lib\net45\FluentFTP.dll</HintPath>\r
</Reference>\r
<Reference Include="LinkDotNet.MessageHandling, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
<HintPath>..\packages\LinkDotNet.MessageBus.0.1.1\lib\LinkDotNet.MessageHandling.dll</HintPath>\r
<Reference Include="System.Data" />\r
<Reference Include="System.Deployment" />\r
<Reference Include="System.Drawing" />\r
+ <Reference Include="System.IO.Compression.FileSystem" />\r
+ <Reference Include="System.Numerics" />\r
+ <Reference Include="System.Runtime.Serialization" />\r
<Reference Include="System.Web" />\r
<Reference Include="System.Windows.Forms" />\r
<Reference Include="System.Xml" />\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
+ throw e;\r
}\r
finally {\r
ostream.Close();\r
}\r
}\r
}\r
- if (parameters.TargetConfig.NexioServer)\r
- Thread.Sleep(500);\r
+ FtpReply reply = targetFTP.GetReply();\r
+ if (reply.Success && "226".Equals(reply.Code)) {\r
+ if (!FileExists(Output))\r
+ throw new Exception("Feltöltési hiba.");\r
+ }\r
+ }\r
+\r
+ protected void reconnect() {\r
+ TerminateClient(targetFTP);\r
+ targetFTP = CreateClient(parameters.TargetConfig.Remote);\r
+ EnsureDirectoryExistence(workingDir);\r
}\r
\r
protected override void UploadContent(string outputPath, byte[] content) {\r
- using (Stream ostream = targetFTP.OpenWrite(outputPath)) {\r
+ using (Stream ostream = targetFTP.OpenWrite(outputPath, FtpDataType.Binary, false)) {\r
try {\r
ostream.Write(content, 0, content.Length);\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- } finally{\r
+ throw e;\r
+ }\r
+ finally {\r
ostream.Close();\r
- } \r
+ }\r
}\r
- if (parameters.TargetConfig.NexioServer)\r
- Thread.Sleep(500);\r
}\r
\r
protected override bool FileExists(string path) {\r
\r
protected override void ExecuteCompleted() {\r
base.ExecuteCompleted();\r
- Status = "Kész";\r
- Message = SUCCESS;\r
workFlowAction.description = SUCCESS;\r
workFlowAction.successful = true;\r
if (parameters.TargetConfig.NexioServer)\r
}\r
if (parameters.TargetConfig.SendEmailOnSuccess && !String.IsNullOrEmpty(parameters.TargetConfig.SuccessEmailRecipient) && !String.IsNullOrEmpty(parameters.TargetConfig.SuccessEmailPattern))\r
SendEmail(parameters.TargetConfig.SuccessEmailRecipient, parameters.TargetConfig.SuccessEmailPattern);\r
+ Status = "Kész";\r
+ Message = SUCCESS;\r
}\r
\r
private void UploadNexioMetadata() {\r
int read, overall = 0;\r
while ((read = istream.Read(buffer, 0, buffer.Length)) > 0) {\r
ostream.Write(buffer, 0, read);\r
+ ostream.Flush();\r
overall += read;\r
Progress = (int)((double)overall / ilength * 100);\r
}\r