git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Thu, 7 Dec 2017 00:25:04 +0000 (00:25 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Thu, 7 Dec 2017 00:25:04 +0000 (00:25 +0000)
client/Maestro/Properties/AssemblyInfo.cs
client/Maestro/Sources/NexioRESTSource.cs
client/MaestroShared/Configuration/ConfigurationInfo.cs
client/OctopusClient/OctopusIDSelector.cs
server/user.jobengine.executors/src/user/jobengine/server/steps/TSMBackupStep.java
server/user.jobengine.executors/src/user/jobengine/server/steps/TranscodeSELENIOStep.java
server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioDataMiner.java
server/user.jobengine.osgi.server/src/user/jobengine/zk/model/JobListModel.java

index fab38224b434a11fb1241e05fe343affcafe252c..268a2a22e1130e415a84795a80c527ebbed3970d 100644 (file)
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers\r
 // by using the '*' as shown below:\r
 // [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("2.0.6.6")]\r
-[assembly: AssemblyFileVersion("2.0.6.6")]\r
+[assembly: AssemblyVersion("2.0.6.7")]\r
+[assembly: AssemblyFileVersion("2.0.6.7")]\r
index d57f3bb517281b7d061749d185ddd247094a2060..1a2bec955eebf12bf0483e3f0de6d1d310de331e 100644 (file)
@@ -224,7 +224,7 @@ namespace Maestro.Sources {
                 item.ID = token[ID].ToString();\r
                 item.Name = token[LONGNAMEID].ToString() + MXFEXT;\r
                 item.Agency = token[EXTAGENCY]?.ToString();\r
-                //item.Created = token.Value<DateTime>(RECORDDATE);\r
+                item.Created = token.Value<DateTime>(RECORDDATE);\r
                 item.Modified = token.Value<DateTime>(MODIFIED);\r
                 int d = token.Value<int>(DURATION);\r
                 item.Duration = new Timecode(d).ToString();\r
index f924788793945852b7affaf9d01e576b89433e30..5092c81be65d52738848610ba24a97480fa5a8bc 100644 (file)
@@ -161,6 +161,7 @@ namespace MaestroShared.Configuration {
     public class OctopusMetadata : MetadataProvider {\r
         public bool DisablePlaceHolderCheck { get; set; }\r
         public bool DisableStoryCheck { get; set; }\r
+        public string RundownStoryFormat { get; set; }\r
         public ProjectSettings ProjectSettings { get; set; }\r
     }\r
 \r
index 56d94cdbb3ee99b58def98deb2fb09e5b0b502bf..b2b6917a022bc473071e98d5270f7630d449d75f 100644 (file)
@@ -78,22 +78,7 @@ namespace OctopusClient {
             txtFilter.Text = null;\r
         }\r
 \r
-        private void RefreshPlaceHolderIDS(String ID) {\r
-            treeOctopus.Nodes.Clear();\r
-\r
-            var stories = client.GetStoryFolderStories(ID);\r
-            if (stories == null)\r
-                return;\r
-            foreach (var story in stories)\r
-                treeOctopus.Nodes.Add(story.ID, String.Format($"{story.ID} {story.Name}"));\r
-        }\r
-\r
-        private void tabControl1_KeyDown(object sender, KeyEventArgs e) {\r
-            this.OnKeyDown(e);\r
-        }\r
-\r
         private void treeContent_KeyDown(object sender, KeyEventArgs e) {\r
-            //this.OnKeyDown(e);\r
             if (e.KeyCode != Keys.F5)\r
                 return;\r
             RefreshList();\r
@@ -111,14 +96,14 @@ namespace OctopusClient {
             foreach (var story in stories) {\r
                 string name = story.Name == null ? OctopusAPI.UNNAMED : story.Name;\r
                 //String ID = isFolderView ? story.ID : story.ParentStoryID;\r
-                String ID = story.ParentStoryID;\r
-                string label = ID;\r
-                if (!String.IsNullOrEmpty(story.Format))\r
-                    label += String.Format($" [{story.Format}] {story.Name}");\r
-                else\r
-                    label += String.Format($" {story.Name}");\r
-\r
-                TreeNode storyNode = treeOctopus.Nodes.Add(ID, label);\r
+                string label = String.Empty;\r
+                    string parentStoryID = story.ParentStoryID;\r
+                if (!String.IsNullOrEmpty(story.Format)) {\r
+                    label = string.Format($"{parentStoryID} [{story.Format}] {story.Name}");\r
+                else\r
+                    label = String.Format($"{parentStoryID} {story.Name}");\r
+\r
+                TreeNode storyNode = treeOctopus.Nodes.Add(parentStoryID, label);\r
                 storyNode.Tag = story;\r
 \r
                 if (parameters.Configuration.DisableStoryCheck)\r
@@ -126,7 +111,7 @@ namespace OctopusClient {
 \r
                 bool selectFirstChild = false;\r
 \r
-                if (lookupStoryId != null && lookupStoryId.Equals(ID)) {\r
+                if (lookupStoryId != null && lookupStoryId.Equals(parentStoryID)) {\r
                     if (parameters.Configuration.DisableStoryCheck)\r
                         selectFirstChild = true;\r
                     else {\r
@@ -372,7 +357,7 @@ namespace OctopusClient {
 \r
             if (stories == null)\r
                 return;\r
-            AddStories(stories);\r
+            AddStories(stories, !rbRundown.Checked);\r
         }\r
 \r
         private void OnSearchPanelPaint(object sender, PaintEventArgs e) {\r
index 1cf1f1d3381be524b7c82f6a07459ad04a2d18f7..44a827a10ad5d47dc47dcf57b428adc7d476662c 100644 (file)
@@ -35,8 +35,11 @@ public class TSMBackupStep extends JobStep {
        @StepEntry\r
        public Object[] execute(ArchiveItem archiveItem, Media mediaCubeMedia, int killDateDays, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
                try {\r
+\r
                        setAndCheck(archiveItem, mediaCubeMedia, jobEngine);\r
                        File sourceMediaFile = new File(archiveItem.getMediaFile());\r
+                       String sourceFileName = sourceMediaFile.getName();\r
+                       jobRuntime.setDescription(String.format("%s: %s (%d bytes)", jobRuntime.getDescription(), sourceFileName, sourceMediaFile.length()));\r
 \r
                        StoreUri sourceUri = manager.createStoreUri(RemoteStoreProtocol.LOCAL, sourceMediaFile.getParent().toString());\r
 \r
@@ -53,7 +56,6 @@ public class TSMBackupStep extends JobStep {
                                        evt.setCancel(!canContinue());\r
                                }\r
                        });\r
-                       String sourceFileName = sourceMediaFile.getName();\r
                        RemoteFile remoteFile = sourceUri.transferFrom(targetUri, sourceFileName, sourceFileName);\r
 \r
                        saveMetadata(mediaCubeMedia, sourceFileName);\r
index 456908b03fea4520b7796e960761f37a7efd7359..964841e92e82f3fb23b18bf2afb62fa73ebda449 100644 (file)
@@ -138,6 +138,10 @@ public class TranscodeSELENIOStep extends JobStep {
                if (transcodeTask == null)\r
                        throw new NullPointerException("Unable to submit transcode task, server response is empty for transcode input: " + sourceFilePath);\r
 \r
+               File sourceMediaFile = new File(archiveItem.getMediaFile());\r
+               String sourceFileName = sourceMediaFile.getName();\r
+               jobRuntime.setDescription(String.format("%s: %s (%d bytes)", jobRuntime.getDescription(), sourceFileName, sourceMediaFile.length()));\r
+\r
                transcodeTask = monitor(jobRuntime, sourceFilePath, transcodeTask);\r
 \r
                jobRuntime.incrementProgress(100);\r
index 55d4dd28c8db3a35d1003132bb3c10f07881f2e0..004627762ea72da88c792ac16adbc5f12838d53b 100644 (file)
@@ -47,6 +47,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener {
        private static final String VIDEOBITRATE = "videobitrate";\r
        private static final String VIDEOFORMAT = "videoformat";\r
        private static final String KILLDATE = "killdate";\r
+       private static final String RECORDTIMESTAMP = "recordtimestamp";\r
        private static String url, user, pass;\r
        static {\r
                url = System.getProperty(JOBENGINE_NEXIO_DB_URL);\r
@@ -280,7 +281,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener {
 \r
        private void transferClips(Connection con, DBCollection collection) {\r
                logger.info("Transfering clips from NEXIO MOS Gateway");\r
-               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)";\r
+               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)";\r
                logger.debug("Executing statement: {}", querySQL);\r
                int count = 0;\r
                try (PreparedStatement stmt = con.prepareStatement(querySQL); ResultSet rs = stmt.executeQuery();) {\r
@@ -293,7 +294,7 @@ public class NexioDataMiner implements Runnable, INexioChangeListener {
                                clip.put(VIDEOFORMAT, rs.getString(VIDEOFORMAT));\r
                                clip.put(DURATION, rs.getLong(DURATION));\r
                                clip.put(MODIFIEDTIMESTAMP, rs.getTimestamp(MODIFIEDTIMESTAMP));\r
-                               clip.put(RECORDDATE, rs.getTimestamp(RECORDDATE));\r
+                               clip.put(RECORDDATE, rs.getTimestamp(RECORDTIMESTAMP));\r
                                clip.put(KILLDATE, rs.getTimestamp(KILLDATE));\r
                                collection.insert(clip);\r
                                count++;\r
index ed7579849346d79c9bfbb57ce7809e4cd1dc57e9..5e7cd7ee79b34558f3e7df53ba9275ccac2ecbe2 100644 (file)
@@ -49,7 +49,12 @@ public class JobListModel extends BaseModel implements IJobChangedListener {
        }\r
 \r
        private int compare(IJobRuntime o1, IJobRuntime o2) {\r
-               return o1.getStatus().compareTo(o2.getStatus());\r
+               //              return o1.getStatus().compareTo(o2.getStatus());\r
+               int ret = (o2.getPriority() - o1.getPriority());\r
+               if ((ret == 0) && (o1.getSubmitted() != null) && (o2.getSubmitted() != null)) {\r
+                       ret = (int) (o2.getSubmitted().getTime() - o1.getSubmitted().getTime());\r
+               }\r
+               return ret;\r
        }\r
 \r
        @Command\r