From: Sweidan Omar Date: Fri, 21 Jan 2022 02:10:56 +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=bd223f96b45046811a8ae007825385948e309ba2;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32843 --- diff --git a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/Support.java b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/Support.java index cb1d0e22..037a3a3e 100644 --- a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/Support.java +++ b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/Support.java @@ -176,7 +176,7 @@ public class Support { // return; // Path status = Paths.get(mediaFilePath.getParent().toString(), ".STATUS", // mediaFile.getName() + ".json"); - // if (!status.toFile().exists()) { + // if (!Files.exists(status)) { // System.out.println("Nincs JSON: " + mediaFile.getAbsolutePath()); // } // @@ -208,9 +208,10 @@ public class Support { private void rescue_archive(RescueNEXIOMaterials processor, String clipName, long duration) throws Exception { /* - int nexioPort, String nexioUserName, String nexioPassword, String archiveFtp, String archiveUserName, String archivePassword, - int nexioKillDateDays, String nexioAgency, IItemManager manager - */ + * int nexioPort, String nexioUserName, String nexioPassword, String archiveFtp, + * String archiveUserName, String archivePassword, int nexioKillDateDays, String + * nexioAgency, IItemManager manager + */ RundownArchive ra = processor.processRundow(clipName, duration); if (ra != null) { @@ -389,7 +390,6 @@ public class Support { } - public int getClipDuration(String name) throws Exception { int duration = 0; Controller controller = new Controller("10.10.1.55"); @@ -398,10 +398,10 @@ public class Support { try { Xid xid = new Xid(name); Clip clip = mediabase.getClip(xid); - + if (clip != null) duration = clip.getDuration(); - //System.out.println(name + " duration: " + duration); + // System.out.println(name + " duration: " + duration); } catch (Exception e) { System.err.println(e.getMessage()); } finally { @@ -409,7 +409,7 @@ public class Support { } return duration; } - + @Test public void test_check_archived_rundownstories() throws Exception { OctopusAPI octopus = new OctopusAPI(); @@ -451,15 +451,14 @@ public class Support { for (BasicDBObject mos : mosObjects) { String mosId = mos.getString(IOctopusAPI.OBJ_ID); if (archived.contains(mosId)) { - //System.out.println(mosId); + // System.out.println(mosId); } else { int duration = getClipDuration(mosId); - + if (duration > 1) System.out.println("Not archived " + mosId + ", duration " + duration); - else - if (duration != 1) - System.out.println("Missing " + mosId); + else if (duration != 1) + System.out.println("Missing " + mosId); } }