From: Vásáry Dániel Date: Fri, 10 Nov 2017 15:34:43 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=c98d6209096cf82c641a129908153c0d5133dd4a;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30712 --- diff --git a/client/AudioRecorder/Resources/configuration.json b/client/AudioRecorder/Resources/configuration.json index d3415703..626a9e1c 100644 --- a/client/AudioRecorder/Resources/configuration.json +++ b/client/AudioRecorder/Resources/configuration.json @@ -1,6 +1,6 @@ { "audio_device_name": "", - "unc_path": "\\\\store.in.user.hu\\upload", + "unc_path": "c:\\temp", "working_dir": "C:\\temp", "loud_percent": 30, "address": "http://10.10.1.28/services/rest/octopus/", diff --git a/client/AudioRecorder/WavRecorder.cs b/client/AudioRecorder/WavRecorder.cs index 01b5c47c..b4a3a3a2 100644 --- a/client/AudioRecorder/WavRecorder.cs +++ b/client/AudioRecorder/WavRecorder.cs @@ -56,8 +56,13 @@ namespace AudioRecorder { if (!pausing) { waveWriter.Write(e.Buffer, 0, e.BytesRecorded); waveWriter.Flush(); - //float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100; - //mainForm.setPanelSizeHeight(panelHeight); + try { + float panelHeight = (device.AudioMeterInformation.MasterPeakValue + device.AudioSessionManager.SimpleAudioVolume.Volume) * 100; + mainForm.setPanelSizeHeight(panelHeight); + } + catch (Exception ex) { + Debug.WriteLine(ex.Message); + } } } diff --git a/client/Maestro/Commons/MorpheusXML.cs b/client/Maestro/Commons/MorpheusXML.cs index cc059cf6..71b314a3 100644 --- a/client/Maestro/Commons/MorpheusXML.cs +++ b/client/Maestro/Commons/MorpheusXML.cs @@ -1,40 +1,80 @@ -using System; +using DxPlay; +using System; +using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Text; using System.Xml; /* - - - 02-02-2018 - TEST TEST - AGENT AGENT - + + + + + XMLTEST011 + Teszt Mozi + 00000914 + + + ISILON + 09/11/2017 + XMLTEST011 + + + */ namespace Commons { public class MorpheusXML { - public static string ToXML(string fileName, DateTime? killDate, string description, string agency) { + + private static string FlattenTC(string tc) { + return tc?.Replace(":", "").Replace(".", ""); + } + + public static byte[] ToXML(string title, string fileName, string deviceID, List segments) { + if (String.IsNullOrEmpty(title)) + throw new NullReferenceException("Hiányzik a cél állomány címe."); if (String.IsNullOrEmpty(fileName)) throw new NullReferenceException("Hiányzik a cél állomány neve."); + if (String.IsNullOrEmpty(deviceID)) + throw new NullReferenceException("Hiányzik a cél állomány eszköz leírója."); - string result = null; + byte[] result = null; XmlDocument doc = new XmlDocument(); - XmlElement rootElement = (XmlElement)doc.AppendChild(doc.CreateElement("ID")); - rootElement.SetAttribute("extendedId", fileName); - if (killDate != null) - rootElement.AppendChild(doc.CreateElement("KillDate")).InnerText = ((DateTime)killDate).ToString("MM-dd-yyyy"); - if (!String.IsNullOrEmpty(description)) - rootElement.AppendChild(doc.CreateElement("ExtendedDescription")).InnerText = description; - if (!String.IsNullOrEmpty(agency)) - rootElement.AppendChild(doc.CreateElement("ExtendedAgency")).InnerText = agency; - - XmlWriterSettings settings = new XmlWriterSettings(); - settings.Indent = true; - StringBuilder ms = new StringBuilder(); - XmlWriter writer = XmlWriter.Create(ms, settings); - doc.Save(writer); - result = ms.ToString(); + XmlElement rootElement = (XmlElement)doc.AppendChild(doc.CreateElement("ImportItems")); + + foreach (MovieSegment segment in segments) { + Timecode duration = new Timecode(); + duration.Set(segment.TCOut.Frames - segment.TCIn.Frames); + XmlNode importItemNode = rootElement.AppendChild(doc.CreateElement("ImportItem")); + XmlElement itemElement = doc.CreateElement("Item"); + importItemNode.AppendChild(itemElement); + itemElement.AppendChild(doc.CreateElement("Material_Id")).InnerText = fileName; + itemElement.AppendChild(doc.CreateElement("Title")).InnerText = title; + itemElement.AppendChild(doc.CreateElement("On_Air_Duration")).InnerText = FlattenTC(duration.ToString()); + XmlElement instanceElement = doc.CreateElement("Instance"); + importItemNode.AppendChild(instanceElement); + instanceElement.AppendChild(doc.CreateElement("Long_File_Id")).InnerText = fileName; + instanceElement.AppendChild(doc.CreateElement("Device_Id")).InnerText = deviceID; + instanceElement.AppendChild(doc.CreateElement("Quality_Check")).InnerText = DateTime.Now.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture); + instanceElement.AppendChild(doc.CreateElement("Timecode_In")).InnerText = FlattenTC(segment.TCIn.ToString()); + instanceElement.AppendChild(doc.CreateElement("Timecode_Out")).InnerText = FlattenTC(segment.TCOut.ToString()); + } + + UTF8Encoding encoding = new UTF8Encoding(false, true); + + //XmlWriterSettings settings = new XmlWriterSettings(); + //settings.Indent = true; + //settings.Encoding = encoding; + + using (MemoryStream output = new MemoryStream()) { + using (XmlTextWriter writer = new XmlTextWriter(output, encoding)) { + writer.Formatting = Formatting.Indented; + writer.WriteStartDocument(); + doc.Save(writer); + } + result = output.ToArray(); + } return result; } } diff --git a/client/Maestro/Commons/NexioXML.cs b/client/Maestro/Commons/NexioXML.cs index bca4977f..05fb32a2 100644 --- a/client/Maestro/Commons/NexioXML.cs +++ b/client/Maestro/Commons/NexioXML.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Text; using System.Xml; diff --git a/client/Maestro/Configuration/ConfigurationInfo.cs b/client/Maestro/Configuration/ConfigurationInfo.cs index 185f71c6..53dc80c4 100644 --- a/client/Maestro/Configuration/ConfigurationInfo.cs +++ b/client/Maestro/Configuration/ConfigurationInfo.cs @@ -65,6 +65,8 @@ namespace Maestro.Configuration { public string Tag { get; set; } public bool SaveArchiveMetadata { get; set; } public bool SaveMorpheusMetadata { get; set; } + public string DeviceIDMorpheus { get; set; } + public string PathMorpheusMetadata { get; set; } public bool DisableFileVersioning { get; set; } public bool SendEmailOnError { get; set; } public string ErrorEmailRecipient { get; set; } @@ -103,6 +105,8 @@ namespace Maestro.Configuration { } public class OctopusMetadata : MetadataProvider { + public bool DisablePlaceHolderCheck { get; set; } + public bool DisableStoryCheck { get; set; } } public class TrafficMetadata : MetadataProvider { diff --git a/client/Maestro/Configuration/configuration-nexio-ingest.json b/client/Maestro/Configuration/configuration-nexio-ingest.json index b3bd70bf..d247d4f9 100644 --- a/client/Maestro/Configuration/configuration-nexio-ingest.json +++ b/client/Maestro/Configuration/configuration-nexio-ingest.json @@ -1,6 +1,6 @@ { "title": "NEXIO betöltő", - "active": false, + "active": true, "startInTray": false, "enableCustomMetadataId": true, "player": { @@ -18,6 +18,8 @@ "metadatas": [ { "$type": "OctopusMetadata", + "disablePlaceHolderCheck": false, + "disableStoryCheck": true, "server": { "address": "http://10.10.1.27/services/rest/octopus/", "timeout": 1000 diff --git a/client/Maestro/Configuration/configuration-playout-ingest.json b/client/Maestro/Configuration/configuration-playout-ingest.json index 59c90388..2cc6c0d2 100644 --- a/client/Maestro/Configuration/configuration-playout-ingest.json +++ b/client/Maestro/Configuration/configuration-playout-ingest.json @@ -51,8 +51,10 @@ "tag": "Adáskész", "disableFileVersioning": true, "saveMorpheusMetadata": true, + "pathMorpheusMetadata": "/PLAYOUT/MorpheusGateway/Input", + "deviceIdMorpheus": "ISILON", "remote": { - "address": "ftp://10.10.1.100/PLAYOUT/IceGateway/Input", + "address": "ftp://10.10.1.100/PLAYOUT/Video", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 @@ -66,8 +68,10 @@ "tag": "XAdáskész", "disableFileVersioning": false, "saveMorpheusMetadata": true, + "pathMorpheusMetadata": "/PLAYOUT/MorpheusGateway/Input", + "deviceIdMorpheus": "ISILON", "remote": { - "address": "ftp://10.10.1.100/PLAYOUT/IceGateway/Input", + "address": "ftp://10.10.1.100/PLAYOUT/Video", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 diff --git a/client/Maestro/Configuration/configuration-playout.json b/client/Maestro/Configuration/configuration-playout.json index ef45e6c7..5a16806f 100644 --- a/client/Maestro/Configuration/configuration-playout.json +++ b/client/Maestro/Configuration/configuration-playout.json @@ -1,7 +1,7 @@ { "title": "Adáslebony", "active": false, - "startInTray": true, + "startInTray": false, "enableCustomMetadataId": true, "player": { "enabled": true, diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index 88c783c0..abfa5d7f 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -338,6 +338,8 @@ + + diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index 229d1128..d861d1c1 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -26,21 +26,21 @@ namespace Maestro { /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaestroForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupSource = new System.Windows.Forms.GroupBox(); this.dgSource = new System.Windows.Forms.DataGridView(); this.bindingSource = new System.Windows.Forms.BindingSource(this.components); @@ -63,9 +63,9 @@ namespace Maestro { this.tpTraffic = new System.Windows.Forms.TabPage(); this.trafficIDSelector = new TrafficClient.TrafficIDSelector(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.mActions = new Maestro.MenuButton(); this.labelSelectedMetadata = new System.Windows.Forms.Label(); this.textSelectedMetadata = new System.Windows.Forms.TextBox(); - this.menuButtonActions = new Maestro.MenuButton(); this.groupTarget = new System.Windows.Forms.GroupBox(); this.panelActions = new System.Windows.Forms.TableLayoutPanel(); this.panel1 = new System.Windows.Forms.Panel(); @@ -159,32 +159,32 @@ namespace Maestro { this.dgSource.BackgroundColor = System.Drawing.Color.White; this.dgSource.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgSource.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15; this.dgSource.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgSource.DataSource = this.bindingSource; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgSource.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgSource.DefaultCellStyle = dataGridViewCellStyle16; this.dgSource.Dock = System.Windows.Forms.DockStyle.Fill; this.dgSource.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgSource.EnableHeadersVisualStyles = false; this.dgSource.Location = new System.Drawing.Point(10, 47); this.dgSource.Name = "dgSource"; this.dgSource.RowHeadersVisible = false; - dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgSource.RowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgSource.RowsDefaultCellStyle = dataGridViewCellStyle17; this.dgSource.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.dgSource.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgSource.Size = new System.Drawing.Size(347, 352); @@ -268,7 +268,7 @@ namespace Maestro { this.textSelectedSource.Location = new System.Drawing.Point(3, 28); this.textSelectedSource.Name = "textSelectedSource"; this.textSelectedSource.ReadOnly = true; - this.textSelectedSource.Size = new System.Drawing.Size(245, 26); + this.textSelectedSource.Size = new System.Drawing.Size(309, 26); this.textSelectedSource.TabIndex = 10; // // label1 @@ -287,15 +287,16 @@ namespace Maestro { // buttonMetadata // this.buttonMetadata.BackColor = System.Drawing.SystemColors.ButtonFace; + this.buttonMetadata.Cursor = System.Windows.Forms.Cursors.Hand; this.buttonMetadata.Dock = System.Windows.Forms.DockStyle.Top; this.buttonMetadata.Enabled = false; this.buttonMetadata.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.buttonMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); - this.buttonMetadata.Location = new System.Drawing.Point(254, 28); + this.buttonMetadata.Image = global::Maestro.Properties.Resources.ic_search_black_24dp_1x; + this.buttonMetadata.Location = new System.Drawing.Point(318, 28); this.buttonMetadata.Name = "buttonMetadata"; - this.buttonMetadata.Size = new System.Drawing.Size(90, 26); + this.buttonMetadata.Size = new System.Drawing.Size(26, 26); this.buttonMetadata.TabIndex = 14; - this.buttonMetadata.Text = "Metadata"; this.buttonMetadata.UseVisualStyleBackColor = false; this.buttonMetadata.Click += new System.EventHandler(this.buttonMetadata_Click); // @@ -438,9 +439,9 @@ namespace Maestro { this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.Controls.Add(this.mActions, 0, 0); this.tableLayoutPanel1.Controls.Add(this.labelSelectedMetadata, 0, 0); this.tableLayoutPanel1.Controls.Add(this.textSelectedMetadata, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.menuButtonActions, 1, 1); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 399); this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); @@ -451,16 +452,30 @@ namespace Maestro { this.tableLayoutPanel1.Size = new System.Drawing.Size(286, 62); this.tableLayoutPanel1.TabIndex = 4; // + // mActions + // + this.mActions.BackColor = System.Drawing.SystemColors.Control; + this.mActions.Dock = System.Windows.Forms.DockStyle.Top; + this.mActions.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.mActions.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.mActions.Location = new System.Drawing.Point(196, 0); + this.mActions.Margin = new System.Windows.Forms.Padding(0); + this.mActions.Menu = this.ctxmActions; + this.mActions.Name = "mActions"; + this.mActions.Size = new System.Drawing.Size(90, 26); + this.mActions.TabIndex = 15; + this.mActions.Text = "Actions"; + this.mActions.UseVisualStyleBackColor = false; + // // labelSelectedMetadata // this.labelSelectedMetadata.AutoSize = true; - this.tableLayoutPanel1.SetColumnSpan(this.labelSelectedMetadata, 2); - this.labelSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Left; this.labelSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.labelSelectedMetadata.Location = new System.Drawing.Point(3, 0); this.labelSelectedMetadata.Name = "labelSelectedMetadata"; this.labelSelectedMetadata.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5); - this.labelSelectedMetadata.Size = new System.Drawing.Size(280, 25); + this.labelSelectedMetadata.Size = new System.Drawing.Size(110, 26); this.labelSelectedMetadata.TabIndex = 13; this.labelSelectedMetadata.Text = "Selected metadata"; // @@ -470,26 +485,12 @@ namespace Maestro { this.textSelectedMetadata.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.textSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Fill; this.textSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.textSelectedMetadata.Location = new System.Drawing.Point(3, 28); + this.textSelectedMetadata.Location = new System.Drawing.Point(3, 29); this.textSelectedMetadata.Name = "textSelectedMetadata"; - this.textSelectedMetadata.Size = new System.Drawing.Size(184, 26); + this.textSelectedMetadata.Size = new System.Drawing.Size(190, 26); this.textSelectedMetadata.TabIndex = 12; this.textSelectedMetadata.TextChanged += new System.EventHandler(this.OnMetadataIDChanged); // - // menuButtonActions - // - this.menuButtonActions.BackColor = System.Drawing.SystemColors.ButtonFace; - this.menuButtonActions.Dock = System.Windows.Forms.DockStyle.Top; - this.menuButtonActions.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.menuButtonActions.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.menuButtonActions.Location = new System.Drawing.Point(193, 28); - this.menuButtonActions.Menu = this.ctxmActions; - this.menuButtonActions.Name = "menuButtonActions"; - this.menuButtonActions.Size = new System.Drawing.Size(90, 27); - this.menuButtonActions.TabIndex = 14; - this.menuButtonActions.Text = "Actions"; - this.menuButtonActions.UseVisualStyleBackColor = false; - // // groupTarget // this.groupTarget.BackColor = System.Drawing.Color.Transparent; @@ -613,14 +614,14 @@ namespace Maestro { this.dgJobs.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells; this.dgJobs.BackgroundColor = System.Drawing.Color.White; this.dgJobs.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgJobs.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgJobs.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18; this.dgJobs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgJobs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.columnLabel, @@ -633,32 +634,32 @@ namespace Maestro { this.columnOutput, this.columnKillDate}); this.dgJobs.DataSource = this.bindingSourceJobs; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.NullValue = null; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgJobs.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.NullValue = null; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgJobs.DefaultCellStyle = dataGridViewCellStyle21; this.dgJobs.Dock = System.Windows.Forms.DockStyle.Fill; this.dgJobs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgJobs.EnableHeadersVisualStyles = false; this.dgJobs.GridColor = System.Drawing.Color.White; this.dgJobs.Location = new System.Drawing.Point(3, 3); this.dgJobs.Name = "dgJobs"; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgJobs.RowHeadersDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle22.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgJobs.RowHeadersDefaultCellStyle = dataGridViewCellStyle22; this.dgJobs.RowHeadersVisible = false; - dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgJobs.RowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle23.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgJobs.RowsDefaultCellStyle = dataGridViewCellStyle23; this.dgJobs.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.dgJobs.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgJobs.Size = new System.Drawing.Size(988, 92); @@ -678,8 +679,8 @@ namespace Maestro { // this.columnID.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; this.columnID.DataPropertyName = "ID"; - dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.columnID.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.columnID.DefaultCellStyle = dataGridViewCellStyle19; this.columnID.HeaderText = "ID"; this.columnID.Name = "columnID"; this.columnID.Width = 44; @@ -696,8 +697,8 @@ namespace Maestro { // this.columnStatus.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; this.columnStatus.DataPropertyName = "Status"; - dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.columnStatus.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.columnStatus.DefaultCellStyle = dataGridViewCellStyle20; this.columnStatus.HeaderText = "Status"; this.columnStatus.Name = "columnStatus"; this.columnStatus.Width = 66; @@ -762,14 +763,14 @@ namespace Maestro { this.dgMessages.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells; this.dgMessages.BackgroundColor = System.Drawing.Color.White; this.dgMessages.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgMessages.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgMessages.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle24; this.dgMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, @@ -777,15 +778,15 @@ namespace Maestro { this.timeDataGridViewTextBoxColumn, this.messageDataGridViewTextBoxColumn}); this.dgMessages.DataSource = this.systemMessageBindingSource; - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Red; - dataGridViewCellStyle12.NullValue = null; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Red; - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgMessages.DefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle26.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle26.ForeColor = System.Drawing.Color.Red; + dataGridViewCellStyle26.NullValue = null; + dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle26.SelectionForeColor = System.Drawing.Color.Red; + dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgMessages.DefaultCellStyle = dataGridViewCellStyle26; this.dgMessages.Dock = System.Windows.Forms.DockStyle.Fill; this.dgMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgMessages.EnableHeadersVisualStyles = false; @@ -793,17 +794,17 @@ namespace Maestro { this.dgMessages.Location = new System.Drawing.Point(3, 3); this.dgMessages.Name = "dgMessages"; this.dgMessages.ReadOnly = true; - dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle27.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle27.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle27; this.dgMessages.RowHeadersVisible = false; - dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgMessages.RowsDefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgMessages.RowsDefaultCellStyle = dataGridViewCellStyle28; this.dgMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.dgMessages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgMessages.Size = new System.Drawing.Size(988, 92); @@ -822,8 +823,8 @@ namespace Maestro { // this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.dataGridViewTextBoxColumn2.DataPropertyName = "Message"; - dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle25.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle25; this.dataGridViewTextBoxColumn2.HeaderText = "Üzenet"; this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; this.dataGridViewTextBoxColumn2.ReadOnly = true; @@ -934,7 +935,6 @@ namespace Maestro { private System.Windows.Forms.TabPage tpTraffic; private System.Windows.Forms.BindingSource metadataInfoBindingSource; private System.Windows.Forms.Panel panel1; - private MenuButton menuButtonActions; private System.Windows.Forms.ContextMenuStrip ctxmActions; private System.Windows.Forms.ToolStripMenuItem ctxiDefineSegments; private System.Windows.Forms.ToolStripMenuItem ctxiModifyArchiveMetadata; @@ -964,6 +964,7 @@ namespace Maestro { private System.Windows.Forms.DataGridViewTextBoxColumn timeDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn; private System.Windows.Forms.PictureBox picClearFilter; + private MenuButton mActions; } } diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index 4a8e1481..db8149da 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -23,6 +23,7 @@ namespace Maestro { private MetadataInfo selectedMetadata; private List segments; + private BindingList movieSegments; private MediaCubeApi mediaCubeApi; private ArchiveMetadata archiveMetadata; private static MetadataType[] validTypes = { MetadataType.TrafficAD, MetadataType.TrafficMaterial, MetadataType.TrafficPromo }; @@ -66,16 +67,18 @@ namespace Maestro { } private void InitializeOctopusSelector() { - OctopusMetadata metadata = Configuration.GetMetadataProvider(); - if (metadata == null) { + OctopusMetadata octopusConfiguration = Configuration.GetMetadataProvider(); + if (octopusConfiguration == null) { tabMetadata.TabPages.Remove(tpOctopus); return; } octopusIDSelector.Configuration = new OctopusConfiguration() { - Address = metadata.Server.Address, - UserName = metadata.Server.UserName, - Password = metadata.Server.Password, - Timeout = metadata.Server.Timeout, + Address = octopusConfiguration.Server.Address, + UserName = octopusConfiguration.Server.UserName, + Password = octopusConfiguration.Server.Password, + Timeout = octopusConfiguration.Server.Timeout, + DisablePlaceHolderCheck = octopusConfiguration.DisablePlaceHolderCheck, + DisableStoryCheck = octopusConfiguration.DisableStoryCheck, MessageBus = errorMessageBus }; octopusIDSelector.IDChangedEvent += OnOctopusIDSelected; @@ -129,17 +132,17 @@ namespace Maestro { if (SelectedSource?.FileInfo == null) return; Cursor = Cursors.WaitCursor; - BindingList movieSegments = GetEditableSegments(); + CreateEditableSegments(); PlayerForm player = new PlayerForm(ref movieSegments); player.AutoStart = Configuration.Player.AutoStart; player.SegmentEditor = Configuration.Player.SegmentEditor; player.Open(SelectedSource.FileInfo); Cursor = Cursors.Default; player.ShowDialog(); - ConvertMovieSegmentsToSegments(movieSegments); + CreateSegments(movieSegments); } - private void ConvertMovieSegmentsToSegments(BindingList movieSegments) { + private void CreateSegments(BindingList movieSegments) { if (movieSegments == null || movieSegments.Count == 0) { segments = null; return; @@ -154,17 +157,16 @@ namespace Maestro { } } - private BindingList GetEditableSegments() { - BindingList result = new BindingList(); + private void CreateEditableSegments() { if (segments == null) segments = GetSegments(); + movieSegments = new BindingList(); if (segments != null) { foreach (Segment segment in segments) { MovieSegment movieSegment = segmentConverter.ConvertToMovieSegment(segment); - result.Add(movieSegment); + movieSegments.Add(movieSegment); } } - return result; } private List GetSegments() { @@ -303,12 +305,14 @@ namespace Maestro { } } + segments = null; + movieSegments = null; + archiveMetadata = null; + UpdateProcessorButtonsEnabled(); UpdateDefineSegmentEnabled(); UpdateEditArchiveMetadataEnabled(); UpdateLookupMetadataEnabled(); - segments = null; - archiveMetadata = null; } private void OnOctopusIDSelected(string id, string name) { @@ -318,24 +322,25 @@ namespace Maestro { SelectedMetadata = null; return; } + MetadataType metadataType = GuessMetadataType(id); SelectedMetadata = new MetadataInfo() { - Kind = MetadataType.OctopusPlaceHolder, + Kind = metadataType, ID = name, VariantID = int.Parse(id) }; } - private void OnTrafficIDSelected(string selectedID, int variantID) { + private void OnTrafficIDSelected(string id, int variantID) { octopusIDSelector.ClearSelection(); archiveMetadata = null; - if (selectedID == null) { + if (id == null) { SelectedMetadata = null; return; } - MetadataType metadataType = GuessMetadataType(selectedID); + MetadataType metadataType = GuessMetadataType(id); SelectedMetadata = new MetadataInfo() { Kind = metadataType, - ID = selectedID, + ID = id, VariantID = variantID }; } diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index 49cf6a0b..f35041e9 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -8,6 +8,7 @@ using Maestro.Metadata; using System.Collections.Generic; using TrafficClient; using MediaCubeClient; +using DxPlay; namespace Maestro { @@ -17,6 +18,7 @@ namespace Maestro { public string InputFileName { get; set; } public string ID { get; set; } public List Segments { get; set; } + public List MovieSegments { get; set; } public MediaCubeApi MediaCubeApi { get; set; } public ArchiveMetadata ArchiveMetadata { get; set; } public TrafficAPI TrafficApi { get; set; } @@ -104,13 +106,14 @@ namespace Maestro { private bool EnsureSegments(Target target) { - if (target.SaveSegments && (segments == null || segments.Count == 0)) { + if ((target.SaveMorpheusMetadata || target.SaveSegments) && (segments == null || segments.Count == 0)) { if (selectedMetadata?.VariantID != null && selectedMetadata?.VariantID != 0) segments = GetSegments(); if (segments == null) { MessageBox.Show(String.Format("A {0} folyamat nem futtatható szegmens adatok nélkül.", target.Label)); return false; } + CreateEditableSegments(); switch (selectedMetadata.Kind) { case MetadataType.TrafficPromo: { if (segments.Count != 1) { @@ -132,7 +135,7 @@ namespace Maestro { } private bool EnsureMetadata(Target target) { - if ((target.SaveArchiveMetadata || target.SaveMorpheusMetadata) && (archiveMetadata == null || !archiveMetadata.IsFilled)) { + if ((target.SaveArchiveMetadata || target.SaveMorpheusMetadata || target.NexioServer) && (archiveMetadata == null || !archiveMetadata.IsFilled)) { archiveMetadata = GetArchiveMetadata(); if (archiveMetadata == null) { MessageBox.Show(String.Format("A {0} folyamat nem futtatható kísérő adatok nélkül.", target.Label)); @@ -156,6 +159,7 @@ namespace Maestro { ID = textSelectedMetadata.Text, InputFileName = sourceItem.Name, Segments = segments == null ? null : new List(segments), + MovieSegments = movieSegments == null ? null : movieSegments.ToList(), ArchiveMetadata = ArchiveMetadata.DeepClone(archiveMetadata), VariantID = selectedMetadata == null ? 0 : selectedMetadata.VariantID, MetadataKind = selectedMetadata == null ? MetadataType.None : selectedMetadata.Kind diff --git a/client/Maestro/MaestroForm.cs b/client/Maestro/MaestroForm.cs index 8ff1f3b7..6ec946e7 100644 --- a/client/Maestro/MaestroForm.cs +++ b/client/Maestro/MaestroForm.cs @@ -59,7 +59,7 @@ namespace Maestro { label1.Text = StringResources.KIVALASZTOTT_FORRAS; labelSelectedMetadata.Text = StringResources.KIVALASZTOTT_METAADAT; btnExecute.Text = StringResources.VEGREHAJT; - menuButtonActions.Text = StringResources.AKCIOK; + mActions.Text = StringResources.AKCIOK; groupActions.Text = StringResources.AKCIOK; columnStarted.HeaderText = StringResources.KEZDES; columnFinished.HeaderText = StringResources.BEFEJEZES; diff --git a/client/Maestro/Program.cs b/client/Maestro/Program.cs index 4efd52ab..c5240690 100644 --- a/client/Maestro/Program.cs +++ b/client/Maestro/Program.cs @@ -1,4 +1,5 @@ -using LinkDotNet.MessageHandling; +using Commons; +using LinkDotNet.MessageHandling; using LinkDotNet.MessageHandling.Contracts; using Maestro.Configuration; using Maestro.Properties; @@ -10,15 +11,19 @@ using System.Collections.Generic; using System.Diagnostics; using System.DirectoryServices.AccountManagement; using System.Drawing; +using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Security.Principal; +using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using System.Xml; +using System.Xml.Linq; namespace Maestro { @@ -59,7 +64,7 @@ namespace Maestro { } catch (Exception e) { Debug.WriteLine(e.Message); - MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!"); + MessageBox.Show(new Form() { TopMost = true }, e.Message); } finally { mutex.ReleaseMutex(); @@ -78,8 +83,8 @@ namespace Maestro { public class TrayApplicationContext : ApplicationContext { private const string GLOBAL_JSON = "global.json"; private const string JSON_WILDCARD = "*.json"; - private const string CONFIG_ERROR = "Nincs aktív konfiguráció!"; - private const string SYSCONFIG_ERROR = "Nincs rendszer konfiguráció!"; + private const string CONFIG_ERROR = "Nem található aktív konfiguráció."; + private const string SYSCONFIG_ERROR = "Nem található a 'global.json' rendszer konfiguráció."; private const string CONFIGURATION_FOLDER = "./Configuration"; private static Logger logger = LogManager.GetCurrentClassLogger(); private NotifyIcon trayIcon; @@ -97,8 +102,8 @@ namespace Maestro { Application.Run(splash); }); } - CreateTrayIcon(); CreateForms(); + CreateTrayIcon(); } private void CreateForms() { diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index 5f7bab42..5664da0d 100644 --- a/client/Maestro/Properties/AssemblyInfo.cs +++ b/client/Maestro/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.9.6")] -[assembly: AssemblyFileVersion("1.9.6")] +[assembly: AssemblyVersion("1.9.8")] +[assembly: AssemblyFileVersion("1.9.8")] diff --git a/client/Maestro/Properties/Resources.Designer.cs b/client/Maestro/Properties/Resources.Designer.cs index ea490d5f..641caf4d 100644 --- a/client/Maestro/Properties/Resources.Designer.cs +++ b/client/Maestro/Properties/Resources.Designer.cs @@ -80,6 +80,26 @@ namespace Maestro.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_playlist_add_check_black_24dp_1x { + get { + object obj = ResourceManager.GetObject("ic_playlist_add_check_black_24dp_1x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_search_black_24dp_1x { + get { + object obj = ResourceManager.GetObject("ic_search_black_24dp_1x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// diff --git a/client/Maestro/Properties/Resources.resx b/client/Maestro/Properties/Resources.resx index e37b6e60..3008b809 100644 --- a/client/Maestro/Properties/Resources.resx +++ b/client/Maestro/Properties/Resources.resx @@ -133,4 +133,10 @@ ..\Resources\Stop.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_search_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_playlist_add_check_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/client/Maestro/Resources/ic_playlist_add_check_black_24dp_1x.png b/client/Maestro/Resources/ic_playlist_add_check_black_24dp_1x.png new file mode 100644 index 00000000..41649077 Binary files /dev/null and b/client/Maestro/Resources/ic_playlist_add_check_black_24dp_1x.png differ diff --git a/client/Maestro/Resources/ic_search_black_24dp_1x.png b/client/Maestro/Resources/ic_search_black_24dp_1x.png new file mode 100644 index 00000000..6b163432 Binary files /dev/null and b/client/Maestro/Resources/ic_search_black_24dp_1x.png differ diff --git a/client/Maestro/Resources/installforge-installer-project.ifp b/client/Maestro/Resources/installforge-installer-project.ifp index c716f113..480eb59c 100644 Binary files a/client/Maestro/Resources/installforge-installer-project.ifp and b/client/Maestro/Resources/installforge-installer-project.ifp differ diff --git a/client/Maestro/Sources/CreatedFileMonitor.cs b/client/Maestro/Sources/CreatedFileMonitor.cs index 785d83fd..2aafd2de 100644 --- a/client/Maestro/Sources/CreatedFileMonitor.cs +++ b/client/Maestro/Sources/CreatedFileMonitor.cs @@ -15,7 +15,7 @@ namespace Maestro.Sources { private bool IsFileAccessible(string path) { try { - using (FileStream stream = File.Open(path, FileMode.Open, FileAccess.Read)) { + using (FileStream stream = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None)) { return true; } } @@ -36,13 +36,15 @@ namespace Maestro.Sources { double currentDiff = (fi.LastWriteTime - fi.CreationTime).TotalSeconds; Debug.WriteLine(string.Format("Diffs current {0} last {1}", currentDiff, lastDiff)); if (lastDiff == currentDiff) { - if (IsFileAccessible(fi.FullName)) + if (IsFileAccessible(fi.FullName)) { e.Result = fi; - else - e.Cancel = true; - break; - } else - lastDiff = currentDiff; + //else + // e.Cancel = true; + break; + } + } + + lastDiff = currentDiff; } } diff --git a/client/Maestro/Targets/FXPTargetProcessor.cs b/client/Maestro/Targets/FXPTargetProcessor.cs index 9718a32b..ab428659 100644 --- a/client/Maestro/Targets/FXPTargetProcessor.cs +++ b/client/Maestro/Targets/FXPTargetProcessor.cs @@ -77,7 +77,9 @@ namespace Maestro.Targets { monitorFTP = CreateClient(parameters.TargetConfig.Remote); monitorFTP.SetWorkingDirectory(workingDir); - monitorFTP.Execute("TYPE I"); + FtpReply monitorReplyTYPE = monitorFTP.Execute("TYPE I"); + if (!monitorReplyTYPE.Success) + throw new Exception(targetReplyTYPE.ErrorMessage); if (!monitorFTP.FileExists(OutputName)) throw new Exception("A cél állomány nem jött létre."); long overall = 0; diff --git a/client/Maestro/Targets/UNCTargetProcessor.cs b/client/Maestro/Targets/UNCTargetProcessor.cs index c260c51a..ba7ce562 100644 --- a/client/Maestro/Targets/UNCTargetProcessor.cs +++ b/client/Maestro/Targets/UNCTargetProcessor.cs @@ -109,11 +109,11 @@ namespace Maestro.Targets { if (parameters.TargetConfig.SaveArchiveMetadata && parameters.ArchiveMetadata != null) CreateArchiveMetadata(); - if (parameters.TargetConfig.SaveMorpheusMetadata && parameters.ArchiveMetadata != null) - CreateArchiveMetadata(); + if (parameters.TargetConfig.SaveMorpheusMetadata && parameters.ArchiveMetadata != null && parameters.MovieSegments != null && parameters.MovieSegments.Count > 0) + UploadMorpheusMetadata(); if (parameters.TargetConfig.SaveSegments && parameters.Segments != null) - //eljuthat-e ide a felhasználó, ha a MetadataKind octopus? parameters.TrafficApi.UpdateTrafficInformation(parameters.VariantID, true, (TrafficMetadataType)parameters.MetadataKind, parameters.Segments); + if (parameters.TargetConfig.SendEmailOnSuccess && !String.IsNullOrEmpty(parameters.TargetConfig.SuccessEmailRecipient) && !String.IsNullOrEmpty(parameters.TargetConfig.SuccessEmailPattern)) SendEmail(parameters.TargetConfig.SuccessEmailRecipient, parameters.TargetConfig.SuccessEmailPattern); Status = "Kész"; @@ -123,18 +123,27 @@ namespace Maestro.Targets { private void UploadNexioMetadata() { String xml = null; string name = GetOutputName(); - string description = parameters.ArchiveMetadata?.mediaTitle == null ? parameters.ArchiveMetadata?.itemTitle : parameters.ArchiveMetadata?.mediaTitle; + string description = parameters.ArchiveMetadata?.mediaTitle; if (parameters.TargetConfig.KillDateDays > 0) { DateTime date = GetKillDate(); KillDate = date.ToString("yyyy.MM.dd"); xml = NexioXML.ToXML(name, date, description, parameters.TargetConfig.Agency); - } - else + } else xml = NexioXML.ToXML(name, null, description, parameters.TargetConfig.Agency); byte[] content = Encoding.Unicode.GetBytes(xml); UploadContent(name + ".xml", content); } + private void UploadMorpheusMetadata() { + string name = GetOutputName(); + string title = parameters.ArchiveMetadata?.itemTitle; + if (!title.Equals(parameters.ArchiveMetadata?.mediaTitle)) + title += " - " + parameters.ArchiveMetadata?.mediaTitle; + byte[] content = MorpheusXML.ToXML(title, name, parameters.TargetConfig.DeviceIDMorpheus, parameters.MovieSegments); + EnsureDirectoryExistence(parameters.TargetConfig.PathMorpheusMetadata); + UploadContent(name + ".xml", content); + } + private void SendEmail(string to, string messagePattern) { try { string message = messagePattern.Replace("%TARGETNAME%", OutputName); @@ -144,7 +153,7 @@ namespace Maestro.Targets { MessageBox.Show(parent, e.Message); } } - + protected virtual void AfterExecute() { Finished = DateTime.Now; workFlowAction.finished = Finished; @@ -172,8 +181,7 @@ namespace Maestro.Targets { if (ID.Contains("_")) subDir = ID.Split('_')[0]; result = Path.Combine(connection.Address.LocalPath, ID); - } - else + } else result = connection.Address.LocalPath; return result; } diff --git a/client/OctopusClient/CheckableTreeView.cs b/client/OctopusClient/CheckableTreeView.cs new file mode 100644 index 00000000..5906b16a --- /dev/null +++ b/client/OctopusClient/CheckableTreeView.cs @@ -0,0 +1,11 @@ +using System; +using System.Windows.Forms; + +namespace OctopusClient { + class CheckableTreeView : TreeView { + protected override void WndProc(ref Message m) { + // Suppress WM_LBUTTONDBLCLK + if (m.Msg == 0x203) { m.Result = IntPtr.Zero; } else base.WndProc(ref m); + } + } +} diff --git a/client/OctopusClient/OctopusClient.csproj b/client/OctopusClient/OctopusClient.csproj index ae78894e..0e3ed536 100644 --- a/client/OctopusClient/OctopusClient.csproj +++ b/client/OctopusClient/OctopusClient.csproj @@ -97,6 +97,9 @@ + + Component + diff --git a/client/OctopusClient/OctopusConfiguration.cs b/client/OctopusClient/OctopusConfiguration.cs index 96c0b312..ea8a9f0b 100644 --- a/client/OctopusClient/OctopusConfiguration.cs +++ b/client/OctopusClient/OctopusConfiguration.cs @@ -7,6 +7,8 @@ namespace OctopusClient { public string UserName { get; set; } public string Password { get; set; } public int Timeout; + public bool DisablePlaceHolderCheck { get; set; } + public bool DisableStoryCheck { get; set; } public IMessageBus MessageBus { get; set; } } } diff --git a/client/OctopusClient/OctopusIDSelector.Designer.cs b/client/OctopusClient/OctopusIDSelector.Designer.cs index 5da9be3b..17b65311 100644 --- a/client/OctopusClient/OctopusIDSelector.Designer.cs +++ b/client/OctopusClient/OctopusIDSelector.Designer.cs @@ -27,7 +27,7 @@ this.dateScheduled = new System.Windows.Forms.DateTimePicker(); this.comboRudowns = new System.Windows.Forms.ComboBox(); this.bindingRundown = new System.Windows.Forms.BindingSource(this.components); - this.treeOctopus = new System.Windows.Forms.TreeView(); + this.treeOctopus = new CheckableTreeView(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tpRundown = new System.Windows.Forms.TabPage(); this.tpStoryFolder = new System.Windows.Forms.TabPage(); diff --git a/client/OctopusClient/OctopusIDSelector.cs b/client/OctopusClient/OctopusIDSelector.cs index 46350fe8..d74fe1a3 100644 --- a/client/OctopusClient/OctopusIDSelector.cs +++ b/client/OctopusClient/OctopusIDSelector.cs @@ -18,9 +18,11 @@ namespace OctopusClient { private TreeNode selectedNode; private OctopusAPI client; public OnSelectedIDChanged IDChangedEvent { get; set; } + private OctopusConfiguration configuration; public OctopusConfiguration Configuration { set { + configuration = value; client = new OctopusAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, value.MessageBus); //refreshStoryFolders(); refreshRundowns(); @@ -31,7 +33,6 @@ namespace OctopusClient { InitializeComponent(); InitializeControlTexts(); treeOctopus.AfterCheck += OnTreeAfterCheck; - //treeOctopus.DrawMode = TreeViewDrawMode.OwnerDrawText; //treeOctopus.DrawNode += new DrawTreeNodeEventHandler(OnDrawNode); } @@ -81,20 +82,24 @@ namespace OctopusClient { private void AddStories(IEnumerable stories) { foreach (var story in stories) { - string name = story.Name == null ? "" : story.Name; + string name = story.Name == null ? "" : story.Name; string label = story.ID; if (!String.IsNullOrEmpty(story.Format)) label += String.Format($" [{story.Format}] {story.Name}"); else label += String.Format($" {story.Name}"); - TreeNode actualNode = treeOctopus.Nodes.Add(story.ID, label); - HideCheckBox(treeOctopus, actualNode); + TreeNode storyNode = treeOctopus.Nodes.Add(story.ID, label); + storyNode.Tag = story.ID; + if (configuration.DisableStoryCheck) + HideCheckBox(treeOctopus, storyNode); MosObject[] mosObjects = story.MosObjects; if (mosObjects == null) continue; foreach (MosObject mosObject in mosObjects) { - TreeNode node = actualNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ObjID}")); - node.Tag = mosObject.ID; + TreeNode placeHolderNode = storyNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ObjID}")); + placeHolderNode.Tag = mosObject.ID; + if (configuration.DisablePlaceHolderCheck) + HideCheckBox(treeOctopus, placeHolderNode); } } } @@ -125,8 +130,9 @@ namespace OctopusClient { } BindingList bindingRundowns = new BindingList(); bindingRundowns.Add(new Rundown() { ID = 0.ToString(), Name = Resources.VALASSZON_ELEMET }); - foreach (Rundown actualRundown in rundowns) + foreach (Rundown actualRundown in rundowns) { bindingRundowns.Add(actualRundown); + } bindingRundown.DataSource = bindingRundowns; comboRudowns.SelectedIndex = selectedRundownIndex == -1 ? 0 : selectedRundownIndex; InitCheckID(treeOctopus.Nodes); @@ -208,19 +214,30 @@ namespace OctopusClient { } private void OnTreeAfterCheck(object sender, TreeViewEventArgs e) { - logger.Debug("Handling {0} {1} {2}", e.Node.Name, e.Node.Text, e.Node.Checked); - if (e.Node.Level == 0) { + //logger.Debug("Handling {0} {1} {2}", e.Node.Name, e.Node.Text, e.Node.Checked); + + if (configuration.DisableStoryCheck && e.Node.Level == 0) { + if (e.Node.Checked) { + e.Node.Checked = false; + HideCheckBox(treeOctopus, e.Node); + } + return; + } + + if (configuration.DisablePlaceHolderCheck && e.Node.Level == 1) { if (e.Node.Checked) { e.Node.Checked = false; HideCheckBox(treeOctopus, e.Node); } return; } + if (!e.Node.Equals(selectedNode)) { ClearSelection(); selectedNode = e.Node; treeOctopus.SelectedNode = selectedNode; } + if (selectedNode.Checked) IDChangedEvent?.Invoke(selectedNode.Tag as string, selectedNode.Name); else diff --git a/client/PlanAIRClient/Workers/ADWorker.cs b/client/PlanAIRClient/Workers/ADWorker.cs index 7dd574aa..e47cc2b7 100644 --- a/client/PlanAIRClient/Workers/ADWorker.cs +++ b/client/PlanAIRClient/Workers/ADWorker.cs @@ -108,7 +108,7 @@ namespace TrafficClient.Workers { using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Operation", 3001); - cmd.Parameters.AddWithValue("@@@Options", 40); + cmd.Parameters.AddWithValue("@@@Options", 0); cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); cmd.Parameters.AddWithValue("@@StrParam1", strParam); using (SqlDataReader reader = cmd.ExecuteReader()) { diff --git a/client/PlanAIRClient/Workers/PromoWorker.cs b/client/PlanAIRClient/Workers/PromoWorker.cs index e0133a67..fc9161a4 100644 --- a/client/PlanAIRClient/Workers/PromoWorker.cs +++ b/client/PlanAIRClient/Workers/PromoWorker.cs @@ -34,7 +34,7 @@ namespace TrafficClient.Workers { return new TrafficItemMetadata() { EpisodeID = data.t_MediaID, ProgID = data.t_SpotID.ToString(), - ProgTitle = data.v_ProgTitle, + ProgTitle = data.v_Title, }; } diff --git a/client/PlanAIRClient/Workers/SegmentWorker.cs b/client/PlanAIRClient/Workers/SegmentWorker.cs index da0d42c5..f96b2224 100644 --- a/client/PlanAIRClient/Workers/SegmentWorker.cs +++ b/client/PlanAIRClient/Workers/SegmentWorker.cs @@ -192,7 +192,7 @@ namespace TrafficClient.Workers { using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Operation", 2001); - cmd.Parameters.AddWithValue("@@@Options", 16); + cmd.Parameters.AddWithValue("@@@Options", 0); cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); cmd.Parameters.AddWithValue("@@StrParam1", strParam); using (SqlDataReader reader = cmd.ExecuteReader()) { @@ -224,7 +224,7 @@ namespace TrafficClient.Workers { using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Operation", 3001); - cmd.Parameters.AddWithValue("@@@Options", 4); + cmd.Parameters.AddWithValue("@@@Options", 0); cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); cmd.Parameters.AddWithValue("@@StrParam1", strParam); using (SqlDataReader reader = cmd.ExecuteReader()) {