From: Vásáry Dániel Date: Tue, 3 Oct 2017 15:07:55 +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=d3efc03b733fff1a896a71ffc44674435068285b;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30519 --- diff --git a/client/Maestro/Metadata/ArchiveMetadata.cs b/client/Maestro/Metadata/ArchiveMetadata.cs index 676b4303..ee33487b 100644 --- a/client/Maestro/Metadata/ArchiveMetadata.cs +++ b/client/Maestro/Metadata/ArchiveMetadata.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Newtonsoft.Json; namespace Maestro.Metadata { public class ArchiveMetadataModel { @@ -16,8 +12,9 @@ namespace Maestro.Metadata { public string MediaDescription { get; set; } public override string ToString() { - return String.Format("{{\n \"Anyag azonosító\": \"{0}\",\n, \"Anyag cím\": \"{1}\",\n \"Anyag leírása\": \"{2}\",\n \"Média azonosító\": \"{3}\",\n \"Média cím\": \"{4}\",\n \"Média leírás\": \"{5}\" \n}}", - StuffID, StuffTitle, StuffDescription, MediaID, MediaTitle, MediaDescription); + return JsonConvert.SerializeObject(this); + //return String.Format("{{\n \"Anyag azonosító\": \"{0}\",\n, \"Anyag cím\": \"{1}\",\n \"Anyag leírása\": \"{2}\",\n \"Média azonosító\": \"{3}\",\n \"Média cím\": \"{4}\",\n \"Média leírás\": \"{5}\" \n}}", + // StuffID, StuffTitle, StuffDescription, MediaID, MediaTitle, MediaDescription); } } } diff --git a/client/Maestro/Resources/configuration-unc.json b/client/Maestro/Resources/configuration-unc.json index b1fc372f..48fa4693 100644 --- a/client/Maestro/Resources/configuration-unc.json +++ b/client/Maestro/Resources/configuration-unc.json @@ -61,12 +61,12 @@ } }, { - "label": "Ready", + "label": "Adáskész", "processor": "FTPTargetProcessor", "outputFormat": "{0}-{1}", "saveSegments": true, "killDateDays": 1, - "tag": "tag", + "tag": "Adáskész", "createSubFolder": true, "useMetadata": true, "remote": { diff --git a/server/-configuration/log4j2.xml b/server/-configuration/log4j2.xml index a848af97..d83853a8 100644 --- a/server/-configuration/log4j2.xml +++ b/server/-configuration/log4j2.xml @@ -61,6 +61,6 @@ - + \ No newline at end of file diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/FakeStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/FakeStep.java index 39ab264a..94a7408e 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/FakeStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/FakeStep.java @@ -2,7 +2,6 @@ package user.jobengine.server.steps; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.MarkerManager; import com.ibm.nosql.json.JSONUtil; import com.ibm.nosql.json.api.BasicDBObject; @@ -17,14 +16,7 @@ public class FakeStep extends JobStep { @StepEntry public Object[] execute(long itemID, IJobEngine jobEngine, IJobRuntime jobRuntime) { try { - // IItemManager manager = jobEngine.getItemManager(); - // StoreUri sourceUri = manager.createStoreUri(RemoteStoreProtocol.SMB, "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE"); - // sourceUri.setUserName("mediacube"); - // sourceUri.setPassword("Broadca5T"); - // List remoteFiles = sourceUri.getRemoteFiles(); - // for (RemoteFile remoteFile : remoteFiles) - // logger.info(remoteFile.getName()); - + logger.warn(getMarker(), "Starting Fake step"); String json = "{ houseID: '111222' }"; BasicDBObject o = (BasicDBObject) JSONUtil.jsonToDbObject(json); for (int i = 0; i < count; i++) { @@ -34,7 +26,6 @@ public class FakeStep extends JobStep { jobRuntime.incrementProgress((i + 1) * count); // logger.info("Progress {}", jobRuntime.getProgress()); } - logger.warn(MarkerManager.getMarker("teszt2"), "Starting Fake step, parameter: {}", itemID); } catch (Exception e) { logger.error(e.getMessage()); } diff --git a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java index 54378da1..92581519 100644 --- a/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java +++ b/server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java @@ -120,7 +120,7 @@ public class NexioClipEventDispatcher implements ClipEventListener { } }); - importThread.start(); + //importThread.start(); } catch (Exception exc) { logger.error("", exc); @@ -136,15 +136,15 @@ public class NexioClipEventDispatcher implements ClipEventListener { try { //DELETE-nel csak az id van kitoltve a CLIP-en, ezert exception jon!!! if (evt.getEventType() == ClipEventType.CLIP_ADDED) { -// if (isValidClip(evt.getClip())) { - BasicDBObject jsClip = convertClipToJSON(evt.getClip()); - //cache??? - Map mongoClips = loadClipsFromMongo(); - saveClipIntoMongo(jsClip, mongoClips); -// } + // if (isValidClip(evt.getClip())) { + BasicDBObject jsClip = convertClipToJSON(evt.getClip()); + //cache??? + Map mongoClips = loadClipsFromMongo(); + saveClipIntoMongo(jsClip, mongoClips); + // } } else if (evt.getEventType() == ClipEventType.CLIP_DELETED) { BasicDBObject jsClip = new BasicDBObject(); - jsClip.put(ID, evt.getClip().getId().get()); //Unique internal ID + jsClip.put(ID, evt.getClip().getId().get()); //Unique internal ID removeDeleted(jsClip); } } catch (Exception exc) { @@ -153,63 +153,63 @@ public class NexioClipEventDispatcher implements ClipEventListener { } //END OF R -/* - private void extendJSONClip(BasicDBObject jsClip, Clip clip) throws Exception { - jsClip.put(ID, clip.getId().get()); //Unique internal ID - jsClip.put(LONGNAMEID, clip.getXid().get()); //Extended ID (Filename) - jsClip.put(DURATION, clip.getDuration()); - jsClip.put(MODIFIEDTIMESTAMP, clip.getModifiedTimestamp().getTime()); - jsClip.put(VIDEO_FORMAT, clip.getVideoFormat()); - jsClip.put(VIDEO_BITRATE, clip.getVideoBitrate()); - jsClip.put(FILESIZE, clip.getFileSize()); - jsClip.put(EXTAGENCY, clip.getExtendedField(GetExtendedFieldCommand.FN_AGENCY)); - //jsClip.put(RECORDDATE, new DateTime(rs.getString(i++)).toDate()); - //jsClip.put(EXTAGENCY, rs.getString(i++)); - //jsClip.put(START, rs.getString(i++)); - //System.out.println(String.format("ID = '%s'\tXID = '%s'\tDuration = '%s'\tModified = '%s'\tVideoFormat = '%s'\tVideoBitrate = '%s'", id, xid, duration, modifiedTimestamp.getTime(), videoFormat, videoBitrate)); - } -*/ - + /* + private void extendJSONClip(BasicDBObject jsClip, Clip clip) throws Exception { + jsClip.put(ID, clip.getId().get()); //Unique internal ID + jsClip.put(LONGNAMEID, clip.getXid().get()); //Extended ID (Filename) + jsClip.put(DURATION, clip.getDuration()); + jsClip.put(MODIFIEDTIMESTAMP, clip.getModifiedTimestamp().getTime()); + jsClip.put(VIDEO_FORMAT, clip.getVideoFormat()); + jsClip.put(VIDEO_BITRATE, clip.getVideoBitrate()); + jsClip.put(FILESIZE, clip.getFileSize()); + jsClip.put(EXTAGENCY, clip.getExtendedField(GetExtendedFieldCommand.FN_AGENCY)); + //jsClip.put(RECORDDATE, new DateTime(rs.getString(i++)).toDate()); + //jsClip.put(EXTAGENCY, rs.getString(i++)); + //jsClip.put(START, rs.getString(i++)); + //System.out.println(String.format("ID = '%s'\tXID = '%s'\tDuration = '%s'\tModified = '%s'\tVideoFormat = '%s'\tVideoBitrate = '%s'", id, xid, duration, modifiedTimestamp.getTime(), videoFormat, videoBitrate)); + } + */ + private BasicDBObject convertClipToJSON(Clip clip) throws Exception { BasicDBObject jsClip = new BasicDBObject(); - try{ + try { jsClip.put(ID, clip.getId().get()); //Unique internal ID - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(LONGNAMEID, clip.getXid().get()); //Extended ID (Filename) - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(DURATION, clip.getDuration()); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(MODIFIEDTIMESTAMP, clip.getModifiedTimestamp().getTime()); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(VIDEO_FORMAT, clip.getVideoFormat()); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(VIDEO_BITRATE, clip.getVideoBitrate()); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(FILESIZE, clip.getFileSize()); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } - try{ + try { jsClip.put(EXTAGENCY, new String(clip.getExtendedField(GetExtendedFieldCommand.FN_AGENCY))); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e); } //jsClip.put(RECORDDATE, new DateTime(rs.getString(i++)).toDate()); @@ -282,14 +282,14 @@ public class NexioClipEventDispatcher implements ClipEventListener { } /* - + int c = connection.read(buffer, 0, 2); //2 bytes hosszan az idokozben hozzaadott id-k szamossaga if (c < 2) { throw new ProtocolException("c, 2, 2"); } //MSB, LSB - + return nofIds; */ return ret;