From: Vásáry Dániel Date: Thu, 7 Dec 2017 00:25:04 +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=aa06b996733611fdcf756569b74cfc8c3bc862d7;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30794 --- diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index fab38224..268a2a22 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("2.0.6.6")] -[assembly: AssemblyFileVersion("2.0.6.6")] +[assembly: AssemblyVersion("2.0.6.7")] +[assembly: AssemblyFileVersion("2.0.6.7")] diff --git a/client/Maestro/Sources/NexioRESTSource.cs b/client/Maestro/Sources/NexioRESTSource.cs index d57f3bb5..1a2bec95 100644 --- a/client/Maestro/Sources/NexioRESTSource.cs +++ b/client/Maestro/Sources/NexioRESTSource.cs @@ -224,7 +224,7 @@ namespace Maestro.Sources { item.ID = token[ID].ToString(); item.Name = token[LONGNAMEID].ToString() + MXFEXT; item.Agency = token[EXTAGENCY]?.ToString(); - //item.Created = token.Value(RECORDDATE); + item.Created = token.Value(RECORDDATE); item.Modified = token.Value(MODIFIED); int d = token.Value(DURATION); item.Duration = new Timecode(d).ToString(); diff --git a/client/MaestroShared/Configuration/ConfigurationInfo.cs b/client/MaestroShared/Configuration/ConfigurationInfo.cs index f9247887..5092c81b 100644 --- a/client/MaestroShared/Configuration/ConfigurationInfo.cs +++ b/client/MaestroShared/Configuration/ConfigurationInfo.cs @@ -161,6 +161,7 @@ namespace MaestroShared.Configuration { public class OctopusMetadata : MetadataProvider { public bool DisablePlaceHolderCheck { get; set; } public bool DisableStoryCheck { get; set; } + public string RundownStoryFormat { get; set; } public ProjectSettings ProjectSettings { get; set; } } diff --git a/client/OctopusClient/OctopusIDSelector.cs b/client/OctopusClient/OctopusIDSelector.cs index 56d94cdb..b2b6917a 100644 --- a/client/OctopusClient/OctopusIDSelector.cs +++ b/client/OctopusClient/OctopusIDSelector.cs @@ -78,22 +78,7 @@ namespace OctopusClient { txtFilter.Text = null; } - private void RefreshPlaceHolderIDS(String ID) { - treeOctopus.Nodes.Clear(); - - var stories = client.GetStoryFolderStories(ID); - if (stories == null) - return; - foreach (var story in stories) - treeOctopus.Nodes.Add(story.ID, String.Format($"{story.ID} {story.Name}")); - } - - private void tabControl1_KeyDown(object sender, KeyEventArgs e) { - this.OnKeyDown(e); - } - private void treeContent_KeyDown(object sender, KeyEventArgs e) { - //this.OnKeyDown(e); if (e.KeyCode != Keys.F5) return; RefreshList(); @@ -111,14 +96,14 @@ namespace OctopusClient { foreach (var story in stories) { string name = story.Name == null ? OctopusAPI.UNNAMED : story.Name; //String ID = isFolderView ? story.ID : story.ParentStoryID; - String ID = story.ParentStoryID; - string label = ID; - if (!String.IsNullOrEmpty(story.Format)) - label += String.Format($" [{story.Format}] {story.Name}"); - else - label += String.Format($" {story.Name}"); - - TreeNode storyNode = treeOctopus.Nodes.Add(ID, label); + string label = String.Empty; + string parentStoryID = story.ParentStoryID; + if (!String.IsNullOrEmpty(story.Format)) { + label = string.Format($"{parentStoryID} [{story.Format}] {story.Name}"); + } else + label = String.Format($"{parentStoryID} {story.Name}"); + + TreeNode storyNode = treeOctopus.Nodes.Add(parentStoryID, label); storyNode.Tag = story; if (parameters.Configuration.DisableStoryCheck) @@ -126,7 +111,7 @@ namespace OctopusClient { bool selectFirstChild = false; - if (lookupStoryId != null && lookupStoryId.Equals(ID)) { + if (lookupStoryId != null && lookupStoryId.Equals(parentStoryID)) { if (parameters.Configuration.DisableStoryCheck) selectFirstChild = true; else { @@ -372,7 +357,7 @@ namespace OctopusClient { if (stories == null) return; - AddStories(stories); + AddStories(stories, !rbRundown.Checked); } private void OnSearchPanelPaint(object sender, PaintEventArgs e) { diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMBackupStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMBackupStep.java index 1cf1f1d3..44a827a1 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMBackupStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMBackupStep.java @@ -35,8 +35,11 @@ public class TSMBackupStep extends JobStep { @StepEntry public Object[] execute(ArchiveItem archiveItem, Media mediaCubeMedia, int killDateDays, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { try { + setAndCheck(archiveItem, mediaCubeMedia, jobEngine); File sourceMediaFile = new File(archiveItem.getMediaFile()); + String sourceFileName = sourceMediaFile.getName(); + jobRuntime.setDescription(String.format("%s: %s (%d bytes)", jobRuntime.getDescription(), sourceFileName, sourceMediaFile.length())); StoreUri sourceUri = manager.createStoreUri(RemoteStoreProtocol.LOCAL, sourceMediaFile.getParent().toString()); @@ -53,7 +56,6 @@ public class TSMBackupStep extends JobStep { evt.setCancel(!canContinue()); } }); - String sourceFileName = sourceMediaFile.getName(); RemoteFile remoteFile = sourceUri.transferFrom(targetUri, sourceFileName, sourceFileName); saveMetadata(mediaCubeMedia, sourceFileName); diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/TranscodeSELENIOStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/TranscodeSELENIOStep.java index 456908b0..964841e9 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/TranscodeSELENIOStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/TranscodeSELENIOStep.java @@ -138,6 +138,10 @@ public class TranscodeSELENIOStep extends JobStep { if (transcodeTask == null) throw new NullPointerException("Unable to submit transcode task, server response is empty for transcode input: " + sourceFilePath); + File sourceMediaFile = new File(archiveItem.getMediaFile()); + String sourceFileName = sourceMediaFile.getName(); + jobRuntime.setDescription(String.format("%s: %s (%d bytes)", jobRuntime.getDescription(), sourceFileName, sourceMediaFile.length())); + transcodeTask = monitor(jobRuntime, sourceFilePath, transcodeTask); jobRuntime.incrementProgress(100); diff --git a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java index 55d4dd28..00462776 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java @@ -47,6 +47,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener { private static final String VIDEOBITRATE = "videobitrate"; private static final String VIDEOFORMAT = "videoformat"; private static final String KILLDATE = "killdate"; + private static final String RECORDTIMESTAMP = "recordtimestamp"; private static String url, user, pass; static { url = System.getProperty(JOBENGINE_NEXIO_DB_URL); @@ -280,7 +281,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener { private void transferClips(Connection con, DBCollection collection) { logger.info("Transfering clips from NEXIO MOS Gateway"); - String querySQL = "SELECT cd.id, c.longnameid, c.recorddate, c.extagency, c.killdate, cd.modifiedtimestamp, cd.duration, cd.videoformat, cd.videobitrate FROM ClipsTbl c LEFT OUTER JOIN ClipsDomainsTbl cd ON (cd.longnameid = c.longnameid)"; + String querySQL = "SELECT cd.id, c.longnameid, c.extagency, c.killdate, cd.recordtimestamp, cd.modifiedtimestamp, cd.duration, cd.videoformat, cd.videobitrate FROM ClipsTbl c LEFT OUTER JOIN ClipsDomainsTbl cd ON (cd.longnameid = c.longnameid)"; logger.debug("Executing statement: {}", querySQL); int count = 0; try (PreparedStatement stmt = con.prepareStatement(querySQL); ResultSet rs = stmt.executeQuery();) { @@ -293,7 +294,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener { clip.put(VIDEOFORMAT, rs.getString(VIDEOFORMAT)); clip.put(DURATION, rs.getLong(DURATION)); clip.put(MODIFIEDTIMESTAMP, rs.getTimestamp(MODIFIEDTIMESTAMP)); - clip.put(RECORDDATE, rs.getTimestamp(RECORDDATE)); + clip.put(RECORDDATE, rs.getTimestamp(RECORDTIMESTAMP)); clip.put(KILLDATE, rs.getTimestamp(KILLDATE)); collection.insert(clip); count++; diff --git a/server/user.jobengine.osgi.server/src/user/jobengine/zk/model/JobListModel.java b/server/user.jobengine.osgi.server/src/user/jobengine/zk/model/JobListModel.java index ed757984..5e7cd7ee 100644 --- a/server/user.jobengine.osgi.server/src/user/jobengine/zk/model/JobListModel.java +++ b/server/user.jobengine.osgi.server/src/user/jobengine/zk/model/JobListModel.java @@ -49,7 +49,12 @@ public class JobListModel extends BaseModel implements IJobChangedListener { } private int compare(IJobRuntime o1, IJobRuntime o2) { - return o1.getStatus().compareTo(o2.getStatus()); + // return o1.getStatus().compareTo(o2.getStatus()); + int ret = (o2.getPriority() - o1.getPriority()); + if ((ret == 0) && (o1.getSubmitted() != null) && (o2.getSubmitted() != null)) { + ret = (int) (o2.getSubmitted().getTime() - o1.getSubmitted().getTime()); + } + return ret; } @Command