From 8821862044cf4ed06d67eb66c95ade17fa9196e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Thu, 5 Oct 2017 14:26:21 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30541 --- .../Resources/configuration-nexio.json | 2 +- .../Maestro/Resources/configuration-unc.json | 14 ++++++------- client/Maestro/Targets/UNCTargetProcessor.cs | 2 +- client/PlanAIRClient/Reader.cs | 1 + client/PlanAIRClient/TrafficAPI.cs | 21 +++++-------------- .../PlanAIRClient/clIFsp_EC_SegmentResult.cs | 13 ++++++++++++ 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/client/Maestro/Resources/configuration-nexio.json b/client/Maestro/Resources/configuration-nexio.json index e31b2a03..e226b0de 100644 --- a/client/Maestro/Resources/configuration-nexio.json +++ b/client/Maestro/Resources/configuration-nexio.json @@ -32,7 +32,7 @@ { "$type": "TrafficMetadata", "server": { - "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", + "address": "Data Source=folkloredb.hu\\sql08,33860;Initial Catalog=CLArchiveTF_0;Persist Security Info=True;", "userName": "MAM", "password": "Echotv.hu", "timeout": 5 diff --git a/client/Maestro/Resources/configuration-unc.json b/client/Maestro/Resources/configuration-unc.json index 4bf60fc1..60442871 100644 --- a/client/Maestro/Resources/configuration-unc.json +++ b/client/Maestro/Resources/configuration-unc.json @@ -33,7 +33,7 @@ { "$type": "TrafficMetadata", "server": { - "address": "Data Source=folkloredb.hu\\sql08,33860;Initial Catalog=CLArchiveTF_0;Persist Security Info=True;", + "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", "userName": "MAM", "password": "Echotv.hu", "timeout": 60 @@ -63,15 +63,15 @@ }, { "label": "Adáskész", - "processor": "FTPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", + "processor": "UNCTargetProcessor", + "outputFormat": "%ID%", "saveSegments": true, - "killDateDays": 1, + "killDateDays": 0, "tag": "Adáskész", - "createSubFolder": true, - "useMetadata": true, + "createSubFolder": false, + "useMetadata": false, "remote": { - "address": "ftp://10.10.1.100:21/READY", + "address": "file://10.10.1.100/BRAAVOS/PLAYOUT/IceGateway", "userName": "mediacube", "password": "Broadca5T" } diff --git a/client/Maestro/Targets/UNCTargetProcessor.cs b/client/Maestro/Targets/UNCTargetProcessor.cs index e8ed691b..615abcf6 100644 --- a/client/Maestro/Targets/UNCTargetProcessor.cs +++ b/client/Maestro/Targets/UNCTargetProcessor.cs @@ -99,7 +99,7 @@ namespace Maestro.Targets { TrafficAPI client = new TrafficAPI(metadata.Server.Address.OriginalString, metadata.Server.UserName, metadata.Server.Password, metadata.Server.Timeout); client.DeleteSegments(maestroForm.SelectedMetadata.VariantID); foreach (Segment actual in segments) { - Segment segment = client.AddSegmentToCopia(maestroForm.SelectedMetadata.VariantID, actual.Comment, actual.TCIn, actual.TCOut, actual.Optional); + client.AddSegmentToCopia(maestroForm.SelectedMetadata.VariantID, actual.Comment, actual.TCIn, actual.TCOut, actual.Optional); } } diff --git a/client/PlanAIRClient/Reader.cs b/client/PlanAIRClient/Reader.cs index b7d25a31..93d1103f 100644 --- a/client/PlanAIRClient/Reader.cs +++ b/client/PlanAIRClient/Reader.cs @@ -116,6 +116,7 @@ namespace TrafficClient { clIFsp_EC_SegmentResult item = new clIFsp_EC_SegmentResult(); int f = 0; item.v_SegID = (int)ReadInt(reader, ref f); + //item.v_ClipID = ReadString(reader, ref f); item.v_VariantID = ReadInt(reader, ref f); item.v_SegTitle = ReadString(reader, ref f); item.v_SegKeyWords = ReadString(reader, ref f); diff --git a/client/PlanAIRClient/TrafficAPI.cs b/client/PlanAIRClient/TrafficAPI.cs index 7af30395..948f6b02 100644 --- a/client/PlanAIRClient/TrafficAPI.cs +++ b/client/PlanAIRClient/TrafficAPI.cs @@ -26,13 +26,14 @@ namespace TrafficClient { using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Operation", 1001); - cmd.Parameters.AddWithValue("@@@Options", 40); cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); if (!missingCopia) { + cmd.Parameters.AddWithValue("@@@Options", 1); cmd.Parameters.AddWithValue("@@StrParam1", strParam); cmd.Parameters.AddWithValue("@@DateParam1", from.Value.Date); cmd.Parameters.AddWithValue("@@DateParam2", to.Value.Date); } else { + cmd.Parameters.AddWithValue("@@@Options", 24); if (!String.IsNullOrEmpty(strParam)) cmd.Parameters.AddWithValue("@@StrParam1", strParam); if (from.HasValue) { @@ -169,8 +170,7 @@ namespace TrafficClient { } } - public Segment AddSegmentToCopia(int itemID, string strParam, long tcIn, long tcOut, bool options) { - Segment result = null; + public void AddSegmentToCopia(int itemID, string strParam, long tcIn, long tcOut, bool options) { //string strparam = String.IsNullOrEmpty(strParam) ? string.Empty : strParam; object strparam = strParam; if (String.IsNullOrEmpty(strParam)) @@ -187,17 +187,7 @@ namespace TrafficClient { cmd.Parameters.AddWithValue("@@StrParam1", strparam); cmd.Parameters.AddWithValue("@@StrParam2", DBNull.Value); cmd.Parameters.AddWithValue("@@@Options", optionsParam); - using (SqlDataReader reader = cmd.ExecuteReader()) { - if (reader.Read()) { - clIFsp_EC_SegmentResult actual = cliFSPReader.ToclIFsp_SegmentResult(reader); - result = new Segment() { - TCIn = actual.v_TcIn.HasValue ? actual.v_TcIn.Value : -1, - TCOut = actual.v_TcOut.HasValue ? actual.v_TcOut.Value : -1, - Comment = actual.v_SegTitle, - Optional = actual.v_Dropable.HasValue ? actual.v_Dropable.Value : false - }; - } - } + cmd.ExecuteNonQuery(); } } catch (Exception e) { @@ -207,7 +197,6 @@ namespace TrafficClient { finally { connection.Close(); } - return result; } private List ExecuteAndReadBradcast(SqlCommand cmd) { @@ -231,7 +220,7 @@ namespace TrafficClient { using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Operation", 1001); - cmd.Parameters.AddWithValue("@@@Options", 40); + cmd.Parameters.AddWithValue("@@@Options", 1); cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); cmd.Parameters.AddWithValue("@@StrParam1", strParam); sqlResult = ExecuteAndReadBradcast(cmd); diff --git a/client/PlanAIRClient/clIFsp_EC_SegmentResult.cs b/client/PlanAIRClient/clIFsp_EC_SegmentResult.cs index 79a8bd88..6226e315 100644 --- a/client/PlanAIRClient/clIFsp_EC_SegmentResult.cs +++ b/client/PlanAIRClient/clIFsp_EC_SegmentResult.cs @@ -11,6 +11,8 @@ namespace TrafficClient { private System.Nullable _v_VariantID; + private string _v_ClipID; + private string _v_SegTitle; private string _v_SegKeyWords; @@ -142,6 +144,17 @@ namespace TrafficClient { } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "v_ClipID", DbType = "VarChar(8)")] + public string v_ClipID { + get { + return this._v_ClipID; + } + set { + if ((this._v_ClipID != value)) { + this._v_ClipID = value; + } + } + } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "v_TcOutTC", DbType = "VarChar(25)")] public string v_TcOutTC { get { -- 2.54.0