From 5ffbce841ef063b7379444a3628c61833f5090b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Wed, 29 Nov 2017 16:34:29 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30773 --- .../ACTIVE-configuration-editor-project.json | 72 ++++ .../Configuration/configuration-archive.json | 5 +- .../Configuration/configuration-studio.json | 2 +- .../Configuration/configuration-sxs-tibi.json | 105 +++++ .../Configuration/configuration-sxs.json | 6 +- .../configuration-torokor-t.json | 110 ++++++ client/Maestro/Configuration/global.json | 2 +- client/Maestro/FolderScanner.cs | 44 +++ .../installforge-installer-project.ifp | Bin 4079 -> 4079 bytes client/Maestro/Maestro.csproj | 10 + client/Maestro/MaestroForm.Designer.cs | 2 + client/Maestro/MaestroForm.Metadata.cs | 12 +- client/Maestro/MaestroForm.Source.cs | 102 +++-- client/Maestro/MaestroForm.Target.cs | 17 +- client/Maestro/MaestroForm.cs | 10 +- client/Maestro/MeastroFormNotifyIcon.cs | 6 +- client/Maestro/Program.cs | 6 +- client/Maestro/Properties/AssemblyInfo.cs | 4 +- client/Maestro/Sources/FileSystemSource.cs | 8 +- client/Maestro/Sources/NexioRESTSource.cs | 5 +- .../Configuration/ConfigurationInfo.cs | 4 + .../Targets/UNCTargetProcessor.cs | 6 +- client/OctopusClient/OctopusIDSelector.cs | 35 +- server/-product/mediacube.product | 2 +- server/-product/pom.xml | 2 +- .../config/config.xml | 5 +- .../config/scheduledjobs.json | 14 + .../src/user/commons/JobStatus.java | 42 +- .../commons/octopus/OctopusDataMiner.java | 8 +- .../src/user/jobengine/db/Media.java | 4 + .../src/user/jobengine/db/MediaFile.java | 1 + .../pages/joblist.zul | 2 +- .../pages/mediaplayer.jsp | 55 +-- .../pages/search_items.zul | 2 + .../src/user/jobengine/server/IJobEngine.java | 2 + .../src/user/jobengine/server/JobEngine.java | 74 ++-- .../jobengine/server/JobStepExecutor.java | 5 + .../jobengine/server/actions/JobAction.java | 23 +- .../server/actions/SkipExecutingAction.java | 16 + .../server/actions/StatusMachine.java | 1 + .../messages/JobStepSkippedMessage.java | 17 + .../user/jobengine/zk/model/JobListModel.java | 123 ++---- .../jobengine/zk/model/JobSelectorModel.java | 6 +- .../user/jobengine/zk/model/SearchModel.java | 32 +- .../osgi/rest/octopus/OctopusRESTService.java | 2 +- .../src/user/tsm/client/TSMClient.java | 359 +++++++++--------- .../user/tsm/client/api/internal/TSMAPI.java | 75 +++- 47 files changed, 963 insertions(+), 482 deletions(-) create mode 100644 client/Maestro/Configuration/ACTIVE-configuration-editor-project.json create mode 100644 client/Maestro/Configuration/configuration-sxs-tibi.json create mode 100644 client/Maestro/Configuration/configuration-torokor-t.json create mode 100644 client/Maestro/FolderScanner.cs create mode 100644 server/user.jobengine.osgi.server/src/user/jobengine/server/actions/SkipExecutingAction.java create mode 100644 server/user.jobengine.osgi.server/src/user/jobengine/server/messages/JobStepSkippedMessage.java diff --git a/client/Maestro/Configuration/ACTIVE-configuration-editor-project.json b/client/Maestro/Configuration/ACTIVE-configuration-editor-project.json new file mode 100644 index 00000000..a88eeba6 --- /dev/null +++ b/client/Maestro/Configuration/ACTIVE-configuration-editor-project.json @@ -0,0 +1,72 @@ +{ + "title": "Project megnyitás", + "active": false, + "startInTray": true, + "enableCustomMetadataId": true, + "defaultWindowColor": "#BDBDBD", + "partialWindowColor": "#757575", + "metadataOnly": true, + "player": { + "enabled": true, + "autoStart": false, + "segmentEditor": true + }, + "source": { + "$type": "UNCSource", + "filter": "avi,wav,mxf", + "local": { + "address": "file://C:/xyz", + } + }, + "metadatas": [ + { + "$type": "OctopusMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/octopus/", + "timeout": 1000 + }, + "projectSettings": { + "templateRoot": { + "address": "file://10.10.1.100/BRAAVOS/.MAESTRO", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + }, + "templateName": "ALAPTIMELINE.ezp", + "target": { + "label": "Projekt létrehozása", + "processor": "UNCTargetProcessor", + "outputFormat": "%ID%-%TEXT%", + "subFolderFormat": "%IDROOT%-%TEXT%/PROJECT", + "disableFileVersioning": true, + "remote": { + "address": "file://10.10.1.100/BRAAVOS/OCTOPUS", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + "disableOpenProject": false, + "disableOpenSourceFolder": false + } + }, + { + "$type": "TrafficMetadata", + "server": { + "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", + "userName": "MAM", + "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", + "timeout": 1000 + } + }, + { + "$type": "MediaCubeMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/jobengine/", + "timeout": 1000 + } + } + ], + "targets": [ + ] +} diff --git a/client/Maestro/Configuration/configuration-archive.json b/client/Maestro/Configuration/configuration-archive.json index bf961418..47daba99 100644 --- a/client/Maestro/Configuration/configuration-archive.json +++ b/client/Maestro/Configuration/configuration-archive.json @@ -10,9 +10,10 @@ }, "source": { "$type": "UNCSource", - "filter": "avi,wav,mxf", + "filter": "mov,wav,mxf", + "foldersAutoExpand": true, "local": { - "address": "file://10.10.1.100/BRAAVOS/TOROKOR", + "address": "file://10.10.1.100/BRAAVOS", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 diff --git a/client/Maestro/Configuration/configuration-studio.json b/client/Maestro/Configuration/configuration-studio.json index 59b522ee..d1b924fe 100644 --- a/client/Maestro/Configuration/configuration-studio.json +++ b/client/Maestro/Configuration/configuration-studio.json @@ -1,6 +1,6 @@ { "title": "Stúdió", - "active": false, + "active": true, "startInTray": false, "enableCustomMetadataId": true, "filter": "avi", diff --git a/client/Maestro/Configuration/configuration-sxs-tibi.json b/client/Maestro/Configuration/configuration-sxs-tibi.json new file mode 100644 index 00000000..2ac76c0f --- /dev/null +++ b/client/Maestro/Configuration/configuration-sxs-tibi.json @@ -0,0 +1,105 @@ +{ + "title": "TIBI SxS", + "active": false, + "startInTray": true, + "enableCustomMetadataId": true, + "defaultWindowColor": "#E0F2F1", + "partialWindowColor": "#B2DFDB", + "player": { + "enabled": true, + "autoStart": true, + "segmentEditor": true, + "extensions": [ "mxf", "mov" ] + }, + "source": { + "$type": "UNCSource", + "filter": "mov,wav,mxf,jpg", + "local": { + "address": "file://c:/x" + } + }, + "metadatas": [ + { + "$type": "OctopusMetadata", + "disableStoryCheck": true, + "server": { + "address": "http://10.10.1.27/services/rest/octopus/", + "timeout": 1000 + } + }, + { + "$type": "TrafficMetadata", + "server": { + "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", + "userName": "MAM", + "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", + "timeout": 1000 + } + }, + { + "$type": "MediaCubeMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/jobengine/", + "timeout": 1000 + } + } + ], + "targets": [ + { + "label": "Octopus mappába küldés", + "processor": "FTPTargetProcessor", + "outputFormat": "%ID%-%SOURCENAME%", + "saveArchiveMetadata": false, + "killDateDays": 7, + "remote": { + "address": "ftp://10.10.1.100/OCTOPUS", + "userName": "mediacube", + "password": "H7YCE8gvuGsPvN3bQSf4FTH0/4IRmoe3gKY0QvgG+wlfqS48yLhm/fDoPSRaWpDWa3RKZAnLF3pKs+lLSQX0IRVZDRCkydQP7syEwKhHztbJ+A88W9rKRF2JrQ7W6jA1", + "timeout": 1000 + }, + "subFolderFormat": "%IDROOT%-%TEXT%", + "tag": "Betöltés" + }, + { + "label": "Traffic mappába küldés", + "processor": "FTPTargetProcessor", + "outputFormat": "%ID%-%SOURCENAME%", + "tag": "Betöltés", + "subFolderFormat": "%IDROOT%-%TEXT%", + "killDateDays": 7, + "saveArchiveMetadata": false, + "remote": { + "address": "ftp://10.10.1.100/PLAYOUT_NLE", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "Lebonyba küldés", + "processor": "FTPTargetProcessor", + "outputFormat": "%ID%", + "tag": "Lebony", + "killDateDays": 7, + "remote": { + "address": "ftp://10.10.1.100/PLAYOUT_CHECK", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "Archiválás", + "processor": "FTPTargetProcessor", + "outputFormat": "%ID%", + "tag": "Archiválás", + "saveArchiveMetadata": true, + "remote": { + "address": "ftp://10.10.1.100/ARCHIVE", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + } + ] +} diff --git a/client/Maestro/Configuration/configuration-sxs.json b/client/Maestro/Configuration/configuration-sxs.json index 94b8ea63..7d6ab651 100644 --- a/client/Maestro/Configuration/configuration-sxs.json +++ b/client/Maestro/Configuration/configuration-sxs.json @@ -10,9 +10,9 @@ }, "source": { "$type": "UNCSource", - "filter": "avi,wav,mxf", + "filter": "mov,wav,mxf", "local": { - "address": "file://c:/" + "address": "file://c:/x" } }, "metadatas": [ @@ -46,7 +46,7 @@ "processor": "FTPTargetProcessor", "outputFormat": "%ID%-%SOURCENAME%", "tag": "Betöltés", - "subFolderFormat": "%DATESTAMP%/%IDROOT%%TEXT%", + "subFolderFormat": "%IDROOT%-%TEXT%", "killDateDays": 7, "saveArchiveMetadata": false, "remote": { diff --git a/client/Maestro/Configuration/configuration-torokor-t.json b/client/Maestro/Configuration/configuration-torokor-t.json new file mode 100644 index 00000000..51b58bb5 --- /dev/null +++ b/client/Maestro/Configuration/configuration-torokor-t.json @@ -0,0 +1,110 @@ +{ + "title": "Törökőr hír nyersanyag betöltő (csak MXF)", + "active": false, + "startInTray": true, + "enableCustomMetadataId": true, + "defaultWindowColor": "#10F2F1", + "partialWindowColor": "#10DFDB", + "player": { + "enabled": true, + "autoStart": false, + "segmentEditor": true + }, + "source": { + "$type": "UNCSource", + "foldersAutoExpand": false, + "filter": "mxf", + "local": { + "address": "file://10.10.1.100//BRAAVOS//OCTOPUS" + }, + "remote": { + "address": "ftp://10.10.1.100/OCTOPUS", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + "metadatas": [ + { + "$type": "OctopusMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/octopus/", + "timeout": 1000 + } + }, + { + "$type": "TrafficMetadata", + "server": { + "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", + "userName": "MAM", + "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", + "timeout": 1000 + } + }, + { + "$type": "MediaCubeMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/jobengine/", + "timeout": 1000 + } + } + ], + "targets": [ + { + "label": "Octopus mappába küldés", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%-%SOURCENAME%", + "tag": "Betöltés", + "subFolderFormat": "%IDROOT%-%TEXT%", + "killDateDays": 7, + "saveArchiveMetadata": false, + "remote": { + "address": "ftp://10.10.1.100/OCTOPUS", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "Traffic mappába küldés", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%-%SOURCENAME%", + "tag": "Betöltés", + "subFolderFormat": "%IDROOT%-%TEXT%", + "killDateDays": 7, + "saveArchiveMetadata": false, + "remote": { + "address": "ftp://10.10.1.100/PLAYOUT_NLE", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "Lebonyba küldés", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%", + "tag": "Lebony", + "killDateDays": 7, + "remote": { + "address": "ftp://10.10.1.100/PLAYOUT_CHECK", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "Archiválás", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%", + "tag": "Archiválás", + "saveArchiveMetadata": true, + "remote": { + "address": "ftp://10.10.1.100/ARCHIVE", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + } + ] +} diff --git a/client/Maestro/Configuration/global.json b/client/Maestro/Configuration/global.json index 52f76c00..11883859 100644 --- a/client/Maestro/Configuration/global.json +++ b/client/Maestro/Configuration/global.json @@ -1,5 +1,5 @@ { - "minimizeToTray": true, + "minimizeToTray": false, "userDomain": { "address": "10.10.254.11", "userName": "echotest", diff --git a/client/Maestro/FolderScanner.cs b/client/Maestro/FolderScanner.cs new file mode 100644 index 00000000..557f8289 --- /dev/null +++ b/client/Maestro/FolderScanner.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Concurrent; +using System.IO; + +namespace Maestro { + + public class FolderScanner { + public delegate void FoundFileSystemEntry(T parent, string entry, string label, bool isDirectory); + public event FoundFileSystemEntry OnFoundFileSystemEntry; + private ConcurrentDictionary cache; + + public void EnumerateDirectories(string path) { + if (!Directory.Exists(path)) + return; + foreach (var entry in Directory.EnumerateDirectories(path, "*", SearchOption.AllDirectories)) { + OnFoundFileSystemEntry?.Invoke( + Get(Path.GetDirectoryName(entry)), + entry, + Uri.UnescapeDataString(Path.GetFileName(entry)), + true + ); + } + } + + public void Put(string key, T value) { + if (cache == null) + cache = new ConcurrentDictionary(); + cache.TryAdd(key, value); + } + + private string GetLastSegment(string path) { + + return Uri.UnescapeDataString(Path.GetFileName(path)); + } + + private T Get(string key) { + T result = default(T); + if (cache == null) + return result; + cache.TryGetValue(key, out result); + return result; + } + } +} diff --git a/client/Maestro/Installer/installforge-installer-project.ifp b/client/Maestro/Installer/installforge-installer-project.ifp index cee5052759c2526c0d2b899787a84fc08e5d3d86..2745a0967707f14e437f00daa9bc4fae41e4979d 100644 GIT binary patch delta 19 bcmaDa|6YDVHlx|boEt2RW}97ES8)LVQGy3B delta 19 bcmaDa|6YDVHlxYLoEt2RCYxPZS8)LVQC + Form @@ -245,9 +246,18 @@ Form + + Always + Always + + Always + + + Always + Always diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index a39221e2..aaebe637 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -1,4 +1,5 @@ using Maestro.Properties; +using System.Windows.Forms; namespace Maestro { partial class MaestroForm { @@ -205,6 +206,7 @@ namespace Maestro { this.treeFolders.Dock = System.Windows.Forms.DockStyle.Bottom; this.treeFolders.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.treeFolders.HotTracking = true; + this.treeFolders.Cursor = Cursors.Hand; this.treeFolders.ImageIndex = 0; this.treeFolders.ImageList = this.ilFolders; this.treeFolders.Location = new System.Drawing.Point(10, 206); diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index caf99e13..cf13a41d 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -162,13 +162,7 @@ namespace Maestro { QuerySegments(); if (movieSegments == null) movieSegments = new BindingList(); - PlayerForm player = new PlayerForm(ref movieSegments); - player.BackColor = partialColor; - player.AutoStart = Configuration.Player.AutoStart; - player.SegmentEditor = Configuration.Player.SegmentEditor; - player.Open(SelectedSource.FileInfo); - Cursor = Cursors.Default; - player.ShowDialog(); + OpenFile(SelectedSource.FileInfo, true); UpdateDefineSegmentsStatus(); } @@ -244,9 +238,9 @@ namespace Maestro { MediaCubeMetadata metadata = Configuration.GetMetadataProvider(); string mcID = ARCHIVEID_PREFIX + masterId.id.ToString(); result.itemHouseId = string.IsNullOrEmpty(metadata?.MetadataIDFormat) ? mcID : metadata.MetadataIDFormat; - result.itemTitle = String.IsNullOrEmpty(metadata?.MetadataTitleFormat) ? result.itemHouseId : metadata.MetadataTitleFormat; + result.itemTitle = result.itemHouseId; result.mediaHouseId = mcID; - result.mediaTitle = result.itemTitle; + result.mediaTitle = String.IsNullOrEmpty(metadata?.MetadataTitleFormat) ? result.itemHouseId : metadata.MetadataTitleFormat; return result; } diff --git a/client/Maestro/MaestroForm.Source.cs b/client/Maestro/MaestroForm.Source.cs index ee8b6138..54e27ad8 100644 --- a/client/Maestro/MaestroForm.Source.cs +++ b/client/Maestro/MaestroForm.Source.cs @@ -1,6 +1,7 @@ using DxPlay; using Maestro.Metadata; using Maestro.Sources; +using MaestroShared.Commons; using MaestroShared.Configuration; using MaestroShared.Metadata; using MaestroShared.Resources; @@ -15,8 +16,8 @@ using System.Windows.Forms; namespace Maestro { - delegate void SetTextCallback(); - delegate void TabControlSelectedIndex(int index); + //delegate void SetTextCallback(); + //delegate void TabControlSelectedIndex(int index); public partial class MaestroForm { private ISource source; private SourceInfo selectedSource; @@ -91,16 +92,33 @@ namespace Maestro { btnShowFolders.CheckState = CheckState.Unchecked; } Uri address = Configuration.Source.Local.Address; - if (!Directory.Exists(address.LocalPath)) - return; - string[] folders = Directory.GetDirectories(address.LocalPath); - TreeNode rootNode = treeFolders.Nodes.Add(GetLastSegment(Configuration.Source.Local.Address.ToString())); - foreach (var folder in folders) { - TreeNode folderNode = rootNode.Nodes.Add(GetLastSegment(folder)); - folderNode.Nodes.Add(".."); - } + + + TreeNode rootNode = treeFolders.Nodes.Add(Path.GetFileName(address.LocalPath)); + + FolderScanner scanner = new FolderScanner(); + scanner.Put(address.LocalPath, rootNode); + scanner.OnFoundFileSystemEntry += (parent, entry, label, isDirectory) => { + //logger.Trace($"{parent} *** {entry}"); + TreeNode node = parent.Nodes.Add(label); + scanner.Put(entry, node); + }; + + treeFolders.BeginUpdate(); + scanner.EnumerateDirectories(address.LocalPath); if ((Configuration.Source as UNCSource).FoldersAutoExpand) treeFolders.ExpandAll(); + rootNode.EnsureVisible(); + treeFolders.EndUpdate(); + //if (!Directory.Exists(address.LocalPath)) + // return; + //string[] folders = Directory.GetDirectories(address.LocalPath); + //TreeNode rootNode = treeFolders.Nodes.Add(GetLastSegment(Configuration.Source.Local.Address.ToString())); + //var orderedFolders = folders.OrderBy(n => n); + //foreach (var folder in orderedFolders) { + // TreeNode folderNode = rootNode.Nodes.Add(GetLastSegment(folder)); + // folderNode.Nodes.Add(".."); + //} } private void HideFolders() { @@ -122,15 +140,16 @@ namespace Maestro { } private void OnBeforeExpandFolder(object sender, TreeViewCancelEventArgs e) { - if (e.Node.Nodes.Count != 1 || !"..".Equals(e.Node.Nodes[0].Text)) - return; - e.Node.Nodes.Clear(); - Uri address = new Uri(Path.Combine(Configuration.Source.Local.Address.LocalPath, GetPath(e.Node))); - string[] folders = Directory.GetDirectories(address.LocalPath); - foreach (var folder in folders) { - TreeNode folderNode = e.Node.Nodes.Add(GetLastSegment(folder)); - folderNode.Nodes.Add(".."); - } + //if (e.Node.Nodes.Count != 1 || !"..".Equals(e.Node.Nodes[0].Text)) + // return; + //e.Node.Nodes.Clear(); + //Uri address = new Uri(Path.Combine(Configuration.Source.Local.Address.LocalPath, GetPath(e.Node))); + //string[] folders = Directory.GetDirectories(address.LocalPath); + //var orderedFolders = folders.OrderBy(n => n); + //foreach (var folder in orderedFolders) { + // TreeNode folderNode = e.Node.Nodes.Add(GetLastSegment(folder)); + // folderNode.Nodes.Add(".."); + //} } private void OnAfterSelectFolder(object sender, TreeViewEventArgs e) { @@ -145,7 +164,10 @@ namespace Maestro { address = new Uri(Uri.UnescapeDataString(Path.Combine(Configuration.Source.Local.Address.LocalPath, GetPath(e.Node)))); if (!String.IsNullOrEmpty(address.LocalPath)) formTooltip.SetToolTip(groupSource, address.LocalPath); - source.Reset(address.LocalPath); + + if (source.Reset(address.LocalPath)) + SelectedSource = null; + btnShowFolders.Checked = false; HideFolders(); } @@ -194,21 +216,43 @@ namespace Maestro { if (fileSourceItem == null) return; dgSource.Enabled = false; - Cursor = Cursors.WaitCursor; - try { - PlayerForm player = new PlayerForm(); + OpenFile(fileSourceItem.FileInfo, false); + dgSource.Enabled = true; + } + } + + private void OpenFile(FileInfo fileInfo, bool segmentEditor) { + Cursor = Cursors.WaitCursor; + try { + string[] extensions = Configuration.Player?.Extensions; + + bool openInternal = false; + if (extensions != null && !String.IsNullOrEmpty(fileInfo.Extension)) + openInternal = extensions.Any(e => e != null && fileInfo.Extension.Length > 0 && fileInfo.Extension.Substring(1).ToLower().Equals(e.ToLower())); + + if (openInternal) { + PlayerForm player = new PlayerForm(ref movieSegments); player.BackColor = partialColor; player.AutoStart = Configuration.Player.AutoStart; - player.Open(fileSourceItem.FileInfo); + player.SegmentEditor = Configuration.Player.SegmentEditor && segmentEditor; + player.Open(fileInfo); if (!player.IsDisposed) player.ShowDialog(); - Cursor = Cursors.Default; - } - catch (Exception ex) { - MessageBox.Show(ex.Message); + } else { + if (segmentEditor) + return; + ProcessStartInfo psf = new ProcessStartInfo() { + FileName = fileInfo.FullName + }; + Process.Start(psf); } - dgSource.Enabled = true; + } + catch (Exception ex) { + MessageBox.Show(ex.Message); + } + finally { + Cursor = Cursors.Default; } } diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index af9fb32b..986dbd69 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -164,19 +164,10 @@ namespace Maestro { }; if (SelectedMetadata.Kind == MetadataType.MediaCube) { - if (true.Equals(result.ArchiveMetadata?.itemTitle?.Contains("%"))) { - string title = PatternNameMaker.Get(result.ArchiveMetadata.itemTitle, result.ID, result.InputFileName, result.MetadataText); - result.ArchiveMetadata.itemTitle = title; - result.ArchiveMetadata.mediaTitle = title; - } - if (true.Equals(result.ArchiveMetadata?.itemHouseId?.Contains("%"))) { - string id = PatternNameMaker.Get(result.ArchiveMetadata.itemHouseId, result.ID, result.InputFileName, result.MetadataText); - if (String.IsNullOrEmpty(id)) - result.ArchiveMetadata.itemHouseId = result.ArchiveMetadata.mediaHouseId; - else - result.ArchiveMetadata.itemHouseId = id; - } - //result.ArchiveMetadata.mediaHouseId = id; + result.ArchiveMetadata.itemHouseId = PatternNameMaker.Get(result.ArchiveMetadata.itemHouseId, result.ID, result.InputFileName, result.MetadataText); + result.ArchiveMetadata.itemTitle = PatternNameMaker.Get(result.ArchiveMetadata.itemTitle, result.ID, result.InputFileName, result.MetadataText); + result.ArchiveMetadata.mediaHouseId = PatternNameMaker.Get(result.ArchiveMetadata.mediaHouseId, result.ID, result.InputFileName, result.MetadataText); + result.ArchiveMetadata.mediaTitle = PatternNameMaker.Get(result.ArchiveMetadata.mediaTitle, result.ID, result.InputFileName, result.MetadataText); } return result; } diff --git a/client/Maestro/MaestroForm.cs b/client/Maestro/MaestroForm.cs index 7d1b3748..c9971247 100644 --- a/client/Maestro/MaestroForm.cs +++ b/client/Maestro/MaestroForm.cs @@ -97,8 +97,6 @@ namespace Maestro { SetColor(groupMetadata, defaultColor); SetColor(groupTarget, defaultColor); SetColor(groupActions, defaultColor); - ShowInTaskbar = !TrayApplicationContext.GlobalConfig.MinimizeToTray; - } private void OnMessage(IMessage message) { @@ -120,12 +118,13 @@ namespace Maestro { private void MaestroForm_Resize(object sender, EventArgs e) { if (WindowState == FormWindowState.Minimized) { - if (TrayApplicationContext.GlobalConfig.MinimizeToTray) + if (TrayApplicationContext.GlobalConfig.MinimizeToTray) Visible = false; } } private void MaestroForm_FormClosing(object sender, FormClosingEventArgs e) { + //if (ModifierKeys.HasFlag() if (TrayApplicationContext.GlobalConfig.MinimizeToTray) Visible = false; else @@ -158,9 +157,10 @@ namespace Maestro { int position = jobs.IndexOf(job); if (position == -1) return; - bindingSourceJobs.Position = position; - if (chkAutoScroll.Checked) + if (chkAutoScroll.Checked) { + bindingSourceJobs.Position = position; dgJobs.FirstDisplayedScrollingRowIndex = position; + } }); job.Execute(); } else { diff --git a/client/Maestro/MeastroFormNotifyIcon.cs b/client/Maestro/MeastroFormNotifyIcon.cs index 8afff418..c821cfac 100644 --- a/client/Maestro/MeastroFormNotifyIcon.cs +++ b/client/Maestro/MeastroFormNotifyIcon.cs @@ -15,6 +15,7 @@ namespace Maestro { Config = config; form.MessageBus = messageBus; form.Configuration = config; + form.ShowInTaskbar = !TrayApplicationContext.GlobalConfig.MinimizeToTray; messageBus.Subscribe(OnFileCreated); messageBus.Subscribe(OnFileRemoved); @@ -67,9 +68,9 @@ namespace Maestro { } public void ShowFormMinimized() { - notification.Visible = false; - form.WindowState = FormWindowState.Minimized; form.Show(); + form.WindowState = FormWindowState.Minimized; + notification.Visible = false; } public void HideForm() { @@ -91,5 +92,6 @@ namespace Maestro { form.Close(); form.Dispose(); } + } } diff --git a/client/Maestro/Program.cs b/client/Maestro/Program.cs index b37bd606..0395a8aa 100644 --- a/client/Maestro/Program.cs +++ b/client/Maestro/Program.cs @@ -97,8 +97,10 @@ namespace Maestro { public static GlobalInfo GlobalConfig { get; internal set; } public TrayApplicationContext() { - string x = Regex.Replace("1234-00_aaaANYAG", "[^0-9$']", "*"); - Debug.WriteLine(x); + //string x = Regex.Replace("1234-00_aaaANYAG", "[^0-9$']", "*"); + //Debug.WriteLine(x); + + //StorageFolder musicFolder = KnownFolders.MusicLibrary; } public static bool HasCommandlineParameter(string parameter) { diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index 7e8c38db..12eaceb3 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.5.5")] -[assembly: AssemblyFileVersion("2.0.5.5")] +[assembly: AssemblyVersion("2.0.5.7")] +[assembly: AssemblyFileVersion("2.0.5.7")] diff --git a/client/Maestro/Sources/FileSystemSource.cs b/client/Maestro/Sources/FileSystemSource.cs index deffadca..035295de 100644 --- a/client/Maestro/Sources/FileSystemSource.cs +++ b/client/Maestro/Sources/FileSystemSource.cs @@ -138,12 +138,14 @@ namespace Maestro.Sources { Reset(null); } - public void Reset(string path) { - if (path != null) - this.Path = path; + public bool Reset(string path) { + if (Path == null || Path.Equals(path)) + return false; + Path = path; Clear(); cache = null; Shutdown(); + return true; } public FileSystemSource(Control parent, IMessageBus messageBus, bool playerEnabled, string fileExtensionFilter) { diff --git a/client/Maestro/Sources/NexioRESTSource.cs b/client/Maestro/Sources/NexioRESTSource.cs index dbd5b7de..524ddbfe 100644 --- a/client/Maestro/Sources/NexioRESTSource.cs +++ b/client/Maestro/Sources/NexioRESTSource.cs @@ -280,7 +280,10 @@ namespace Maestro.Sources { if (item == null) return; parent.SafeCall(() => { - Remove(item); + try { + Remove(item); + } + catch (Exception e) { } messageBus.Send(new RemoveFileActionMsg() { FileName = item.Name, Source = parent diff --git a/client/MaestroShared/Configuration/ConfigurationInfo.cs b/client/MaestroShared/Configuration/ConfigurationInfo.cs index 110d2c8a..ac2b1b8d 100644 --- a/client/MaestroShared/Configuration/ConfigurationInfo.cs +++ b/client/MaestroShared/Configuration/ConfigurationInfo.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Collections.Generic; using System.IO; using System.Drawing; +using System.ComponentModel; namespace MaestroShared.Configuration { @@ -59,6 +60,9 @@ namespace MaestroShared.Configuration { public bool Enabled { get; set; } public bool AutoStart { get; set; } public bool SegmentEditor { get; set; } + [DefaultValue(new []{"MXF"})] + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] + public string[] Extensions { get; set; } } public class Target { diff --git a/client/MaestroShared/Targets/UNCTargetProcessor.cs b/client/MaestroShared/Targets/UNCTargetProcessor.cs index 5b2ef4a7..e6d1b154 100644 --- a/client/MaestroShared/Targets/UNCTargetProcessor.cs +++ b/client/MaestroShared/Targets/UNCTargetProcessor.cs @@ -272,10 +272,12 @@ namespace MaestroShared.Targets { int o = segment.IndexOf(UNDERSCORE); if (formats[i].Contains("%") && (p > -1 || o > -1)) { string pattern = null; - if (p < o && p > -1) + if (p <= o && p > -1) pattern = segment.Substring(0, p); - else + if (pattern == null && o < p && o > -1) pattern = segment.Substring(0, o); + if (pattern == null && o < p && p > -1) + pattern = segment.Substring(0, p); pattern += STAR; string searchResult = SearchDirectory(result, pattern); if (searchResult == null) diff --git a/client/OctopusClient/OctopusIDSelector.cs b/client/OctopusClient/OctopusIDSelector.cs index 6c7c8acf..79f8f646 100644 --- a/client/OctopusClient/OctopusIDSelector.cs +++ b/client/OctopusClient/OctopusIDSelector.cs @@ -78,7 +78,7 @@ namespace OctopusClient { e.Node.Level == 1 && !parameters.Configuration.DisablePlaceHolderCheck) { using (Pen pen = new Pen(Color.Black)) { pen.Width = 1; - e.Graphics.DrawLine(pen, e.Bounds.X, e.Bounds.Y + 2, e.Bounds.X, e.Bounds.Y + e.Bounds.Height - 4); + e.Graphics.DrawLine(pen, e.Bounds.X, e.Bounds.Y + 2, e.Bounds.X, e.Bounds.Y + e.Bounds.Height - 4); } } } @@ -119,10 +119,10 @@ namespace OctopusClient { //this.OnKeyDown(e); if (e.KeyCode != Keys.F5) return; - Refresh(); + RefreshList(); } - private void Refresh() { + private void RefreshList() { if (String.IsNullOrEmpty(txtFilter.Text)) RefreshStories(); else @@ -132,7 +132,8 @@ namespace OctopusClient { private void AddStories(IEnumerable stories, bool isFolderView = false) { foreach (var story in stories) { string name = story.Name == null ? OctopusAPI.UNNAMED : story.Name; - String ID = isFolderView ? story.ID : story.ParentStoryID; + //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}"); @@ -144,8 +145,13 @@ namespace OctopusClient { if (parameters.Configuration.DisableStoryCheck) HideCheckBox(treeOctopus, storyNode); - else { - if (lookupStoryId != null && lookupStoryId.Equals(story.ID)) + + bool selectFirstChild = false; + + if (lookupStoryId != null && lookupStoryId.Equals(ID)) { + if (parameters.Configuration.DisableStoryCheck) + selectFirstChild = true; + else storyNode.Checked = true; } @@ -158,7 +164,12 @@ namespace OctopusClient { if (parameters.Configuration.DisablePlaceHolderCheck) HideCheckBox(treeOctopus, placeHolderNode); else { - if (lookupPlaceHolderId != null && lookupPlaceHolderId.Equals(mosObject.ObjID)) { + if ((lookupPlaceHolderId != null && lookupPlaceHolderId.Equals(mosObject.ObjID)) || selectFirstChild) { + if (selectFirstChild && selectedNode != null) { + selectFirstChild = false; + MsgBox.Warning("Fokozott flehasználói figyelemre van szükség. Az anyag kiválasztás le van tiltva a konfigurációban, így az első elérhető bejátszó került kiválasztásra."); + continue; + } placeHolderNode.Checked = true; storyNode.Expand(); placeHolderNode.EnsureVisible(); @@ -197,7 +208,7 @@ namespace OctopusClient { Story story = selectedNode.Tag as Story; string text = String.IsNullOrEmpty(story.Format) ? story.Name : String.Format($"{story.Name}_{story.Format}"); IDChangedEvent?.Invoke(story.ParentStoryID, selectedNode.Name, text); - } else + } else IDChangedEvent?.Invoke(null, null, null); } @@ -287,7 +298,7 @@ namespace OctopusClient { } } } - + } else { refreshDisabled = true; dtScheduled.Value = rundown.Start; @@ -302,7 +313,7 @@ namespace OctopusClient { cbFolders.SelectedItem = rundownToSelect; } } - + } txtFilter.Text = placeHolderId; if (selectedNode == null) @@ -441,7 +452,7 @@ namespace OctopusClient { processor.Execute(); - if (!TargetProcessor.READY.Equals(processor.Status) || !TargetProcessor.SKIPPED.Equals(processor.Status)) { + if (!TargetProcessor.READY.Equals(processor.Status) && !TargetProcessor.SKIPPED.Equals(processor.Status)) { MsgBox.Error(processor.Message); return; } @@ -455,7 +466,7 @@ namespace OctopusClient { } private void noFocusCueButton1_Click(object sender, EventArgs e) { - Refresh(); + RefreshList(); } } diff --git a/server/-product/mediacube.product b/server/-product/mediacube.product index 9d427d6f..43522714 100644 --- a/server/-product/mediacube.product +++ b/server/-product/mediacube.product @@ -45,7 +45,7 @@ #Selenio -Djobengine.selenio.address=http://10.10.1.71:44000/TranscodeMgrWS?wsdl --Djobengine.selenio.projectfilepath=\\10.10.1.71\Data\Blueprints\MP4_H264_AAC_v3.zenium +-Djobengine.selenio.projectfilepath=\\10.10.1.71\Data\Blueprints\MP4_H264_AAC_v5.zenium #Nexio -Dnexio.host=10.10.1.55 diff --git a/server/-product/pom.xml b/server/-product/pom.xml index 8904badb..b208a624 100644 --- a/server/-product/pom.xml +++ b/server/-product/pom.xml @@ -291,7 +291,7 @@ /command "open ${remote.address} -hostkey=""${remote.hostkey}""" - + "call pcs resource disable mediacube_script" "call rm -rf ${remote.location}" "call mkdir ${remote.location}" diff --git a/server/user.jobengine.executors/config/config.xml b/server/user.jobengine.executors/config/config.xml index cf02215e..329c35f5 100644 --- a/server/user.jobengine.executors/config/config.xml +++ b/server/user.jobengine.executors/config/config.xml @@ -10,6 +10,7 @@ - - + + + \ No newline at end of file diff --git a/server/user.jobengine.executors/config/scheduledjobs.json b/server/user.jobengine.executors/config/scheduledjobs.json index f84835ab..b6bdbf94 100644 --- a/server/user.jobengine.executors/config/scheduledjobs.json +++ b/server/user.jobengine.executors/config/scheduledjobs.json @@ -14,6 +14,20 @@ ] }, { + "active": false, + "name" : "Egy archiválás", + "template": "archive-ondemand.xml", + "executeimmediate": true, + "cronexpression": "0 0 0/1 1/1 * ? *", + "parameters": [ + {"name": "sourcePath", "value": "/mnt/ISILON/ARCHIVE/ONE", "type": "java.lang.String"}, + {"name": "globalSourcePath", "value": "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE\\ONE", "type": "java.lang.String"}, + {"name": "transcoderTargetPath", "value": "/mnt/SELENIO", "type": "java.lang.String"}, + {"name": "webPath", "value": "/mediacube/data/lowres/www/video", "type": "java.lang.String"}, + {"name": "killDateDays", "value": 1, "type": "java.lang.Integer"} + ] + }, + { "active": false, "name" : "TRAFFIC anyagok visszatöltése", "template": "retrieve-traffic-missing-materials.xml", diff --git a/server/user.jobengine.osgi.commons/src/user/commons/JobStatus.java b/server/user.jobengine.osgi.commons/src/user/commons/JobStatus.java index 3715d823..ff40329c 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/JobStatus.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/JobStatus.java @@ -5,47 +5,41 @@ package user.commons; */ public enum JobStatus { /** - * Futtatható - a folyamat az ütemező várakozási sorában található, az - * ütemező a megfelelő időben futtatja a gépi kódú utasításokat. + * Felfüggesztett - a folyamat egy manuális felfüggesztés-kérés hatására felfüggesztett állapotba került. */ - RUNABLE(0x0001), - /** - * Felfüggesztett - a folyamat egy manuális felfüggesztés-kérés hatására - * felfüggesztett állapotba került. - */ - SUSPENDED(0x0002), + SUSPENDED(0x0001), /** * Vége - a folyamat futása befejeződött. */ - FINISHED(0x0004), + FINISHED(0x0002), /** - * Végrehajtás alatt - a folyamat végrehajtó futtatja a lépést. + * Futtatható - a folyamat az ütemező várakozási sorában található, az ütemező a megfelelő időben futtatja a gépi kódú utasításokat. */ - EXECUTING(0x0008), + RUNABLE(0x0004), /** * Megszakított állapot. */ - CANCELED(0x0010), + CANCELED(0x0008), /** - * Végrehajtóra vár - a folyamat aktuális utasítása végrehajtót igényel, - * annak várakozási sorában található. + * Végrehajtóra vár - a folyamat aktuális utasítása végrehajtót igényel, annak várakozási sorában található. */ - WAIT_EXECUTOR(0x0101), + WAIT_EXECUTOR(0x0100), /** - * Felfüggesztésre vár - a folyamat felfüggesztés kérelmet kapott, de még - * nem történt meg a felfüggesztés. + * Válaszra vár - a folyamat egy felhasználói üzenet végrehajtása után, annak megválaszolására vár. */ - WAIT_SUSPEND(0x0102), + WAIT_USERMESSAGE(0x0102), /** - * Válaszra vár - a folyamat egy felhasználói üzenet végrehajtása után, - * annak megválaszolására vár. + * Felfüggesztésre vár - a folyamat felfüggesztés kérelmet kapott, de még nem történt meg a felfüggesztés. */ - WAIT_USERMESSAGE(0x0104), + WAIT_SUSPEND(0x0104), /** - * Megszakításra vár - a folyamat megszakítási kérelmet kapott, annak - * lefutását várja. A megszakítási folyamat eredménye CANCELED állapot lesz. + * Megszakításra vár - a folyamat megszakítási kérelmet kapott, annak lefutását várja. A megszakítási folyamat eredménye CANCELED állapot lesz. + */ + WAIT_CANCEL(0x0108), + /** + * Végrehajtás alatt - a folyamat végrehajtó futtatja a lépést. */ - WAIT_CANCEL(0x0108); + EXECUTING(0x1000); private final int value; diff --git a/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java b/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java index 96760ebb..d5df0df1 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/octopus/OctopusDataMiner.java @@ -41,7 +41,7 @@ public class OctopusDataMiner implements Runnable { private static final String SAVING_STORY_ID = "Saving story {}"; private static final String SAVING_RUNDOWN = "Saving rundown : {} {}"; private static final String CHECKING_RUNDOWN = "Checking Rundown {} ({}/{})"; - private static final String FIELDS_STORIES = "stories,Story.modified,Story.name,Story.id,Story.mosObjects,Story.script,Story.type,Story.format,customColumns,CustomColumn.label,CustomColumn.value"; + private static final String FIELDS_STORIES = "stories,Story.modified,Story.name,Story.id,Story.mosObjects,Story.script,Story.type,Story.format,Story.customColumns,CustomColumn.label,CustomColumn.value"; private static final String FIELDS_SLUGS = "slugs,Slug.story,Slug.position,Story.name,Story.id,Story.modified,Story.mosObjects,Story.script,Story.type,Story.format,Story.customColumns,CustomColumn.label,CustomColumn.value"; private static final String FIELDS_RUNDOWN_LIST = "id,name,modified,scheduledStart,rundownType,RundownType.name,slugs,Slug.storyId,Slug.position"; private static final String FIELDS_STORY_FOLDER_LIST = "id,name,modified,stories,Story.id"; @@ -611,11 +611,11 @@ public class OctopusDataMiner implements Runnable { } else story.put(IOctopusAPI.MOS_OBJECTS, modifiedMOS); - String parentSoryId = GetCustomColumnValue(IOctopusAPI.PARENT_STORY_ID, story); - if (parentSoryId == null) + String parentStoryId = GetCustomColumnValue(IOctopusAPI.PARENT_STORY_ID, story); + if (parentStoryId == null) story.append(IOctopusAPI.PARENT_STORY_ID, storyID); else - story.append(IOctopusAPI.PARENT_STORY_ID, parentSoryId); + story.append(IOctopusAPI.PARENT_STORY_ID, parentStoryId); logger.debug(SAVING_STORY_ID, storyID); collection.save(story); logger.trace(EXIT); diff --git a/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java b/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java index acfa8b3a..aa343583 100644 --- a/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java +++ b/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java @@ -71,6 +71,10 @@ public class Media extends DynamicAttributes { return mediaFiles; } + public int getMediaFilesCount() { + return getMediaFiles() == null ? 0 : getMediaFiles().size(); + } + public byte[] getPoster() { return poster; } diff --git a/server/user.jobengine.osgi.db/src/user/jobengine/db/MediaFile.java b/server/user.jobengine.osgi.db/src/user/jobengine/db/MediaFile.java index e7acd34b..2fe834c5 100644 --- a/server/user.jobengine.osgi.db/src/user/jobengine/db/MediaFile.java +++ b/server/user.jobengine.osgi.db/src/user/jobengine/db/MediaFile.java @@ -107,4 +107,5 @@ public class MediaFile extends EntityBase implements Serializable { //checkParameter("StoreId", id); this.storeId = id; } + } \ No newline at end of file diff --git a/server/user.jobengine.osgi.server/pages/joblist.zul b/server/user.jobengine.osgi.server/pages/joblist.zul index 5dd0c476..e635a992 100644 --- a/server/user.jobengine.osgi.server/pages/joblist.zul +++ b/server/user.jobengine.osgi.server/pages/joblist.zul @@ -22,7 +22,7 @@ -
+