From: Vásáry Dániel Date: Tue, 22 Sep 2020 09:27:35 +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=af29ee9690dfac044b6fac18fbb22e5edc7dad8f;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C31958 --- diff --git a/server/-configuration/run-mediacube-server-hirtv.launch b/server/-configuration/run-mediacube-server-hirtv.launch index 462450a6..e7017ca4 100644 --- a/server/-configuration/run-mediacube-server-hirtv.launch +++ b/server/-configuration/run-mediacube-server-hirtv.launch @@ -19,7 +19,7 @@ - + diff --git a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java index 8ac626b5..4a5fbbd0 100644 --- a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java +++ b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SmallTests.java @@ -11,6 +11,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -364,4 +365,59 @@ public class SmallTests { System.out.println(p.getFileName()); } } + + @Test + public void test96() throws Exception { + List lines = Files.readAllLines(Paths.get("/_workspace/lengt-erreor.txt")); + Set errors = new HashSet<>(); + for (String line : lines) { + String[] chunks = line.split("INFO"); + String chunk = chunks[1]; + chunk = chunk.replace("LogManager$getLogger.call - ", "").trim(); + chunk = chunk.replace(" has different length", ""); + chunk = chunk.replace("length:", ""); + chunk = chunk.replace(" MC ", ""); + chunk = chunk.replace(" !=", ""); + chunk = chunk.replace(" NEXIO", ""); + chunk = chunk.replace(" (null:-1)", ""); + + String[] clip = chunk.split(" "); + if (clip.length != 3) + throw new Exception("Not 3"); + String clipName = clip[0].trim() + ".mxf"; + int mc = Integer.parseInt(clip[1]); + int nexio = Integer.parseInt(clip[2]); + if (mc > nexio) { + errors.add(clipName); + // System.out.println("Added: " + clipName); + } + } + + List archived = Files.readAllLines(Paths.get("/_workspace/archived.txt")); + Set archivedErrors = new HashSet<>(); + for (String archive : archived) { + int i1 = archive.indexOf("Transfer of "); + int i2 = archive.indexOf(" completed"); + String archivedName = archive.substring(i1 + 12, i2).trim(); + if (errors.contains(archivedName)) + archivedErrors.add(archivedName); + } + + for (String archivedError : archivedErrors) { + System.out.println(archivedError); + } + } + + //update mediafile set relativepath ='CCEM100023-14.mxf.part' where relativepath ='CCEM100023-14.mxf'; + @Test + public void test97() throws Exception { + List lines = Files.readAllLines(Paths.get("/opt/ordered-errors-sql.txt")); + List out = new ArrayList<>(); + + for (String id : lines) { + out.add("update mediafile set relativepath ='" + id + ".mxf.part' where relativepath ='" + id + ".mxf';"); + } + + Files.write(Paths.get("/opt/sql.txt"), out); + } } diff --git a/server/user.jobengine.osgi.db/src/user/jobengine/search/MediaFinder.java b/server/user.jobengine.osgi.db/src/user/jobengine/search/MediaFinder.java index b4abceb6..967303ab 100644 --- a/server/user.jobengine.osgi.db/src/user/jobengine/search/MediaFinder.java +++ b/server/user.jobengine.osgi.db/src/user/jobengine/search/MediaFinder.java @@ -42,16 +42,14 @@ public class MediaFinder implements IMediaFinder { sql.append("m.length,"); sql.append("m.itemtypeid mediaitemtypeid,"); sql.append(String.format("HIGHLIGHT(md.description, '', '', '%s') description,", criteriasPattern)); + // sql.append("'blabla' description,"); sql.append("it.name mediaitemtypename,"); sql.append("m.houseid mediahouseid,"); sql.append("mf.houseid mediafilehouseid,"); sql.append("vw_mf.mediafilecount"); - sql.append(" FROM ITEM i"); - sql.append(" LEFT OUTER JOIN MEDIADESCRIPTION md ON (md.itemid = i.id)"); - sql.append(" LEFT OUTER JOIN MEDIA m ON (m.id = md.mediaid)"); - sql.append(" LEFT OUTER JOIN MEDIAFILE mf ON (mf.id = md.mediafileid)"); - sql.append(" LEFT OUTER JOIN VW_MEDIAFILES vw_mf ON (vw_mf.mediaid=m.id)"); - sql.append(" LEFT OUTER JOIN ITEMTYPE it ON (it.id = m.itemTypeId)"); + sql.append(" FROM ITEM i, MEDIA m, MEDIAFILE mf, MEDIADESCRIPTION md, VW_MEDIAFILES vw_mf, ITEMTYPE it"); + sql.append(" WHERE i.id = md.itemid AND m.id = md.mediaid AND mf.id = md.mediafileid"); + sql.append(" AND m.id=vw_mf.mediaid AND m.itemTypeId = it.id"); if (typeIDs != null) { sql.append(" AND m.itemtypeid IN "); sql.append(typeCriteria.toString()); @@ -60,6 +58,7 @@ public class MediaFinder implements IMediaFinder { if (simpleSearch) { if (criteria.endsWith("*")) criteria = criteria.replace("*", ""); + criteria = criteria.trim(); if (criteria != null && criteria.trim().length() > 0) sql.append(" AND m.title LIKE('%" + criteria + "%')"); } else { diff --git a/server/user.jobengine.osgi.server/js/searchitems.js b/server/user.jobengine.osgi.server/js/searchitems.js index e8b14946..2ad9236a 100644 --- a/server/user.jobengine.osgi.server/js/searchitems.js +++ b/server/user.jobengine.osgi.server/js/searchitems.js @@ -47,7 +47,8 @@ function pushTcOut() { }); } -/* Címke kezelés +/* Címke kezelés */ + var input = document.querySelector('textarea[name=tags2]'), tagify = new Tagify( input, { @@ -73,6 +74,6 @@ function onTag(e) { toServer : true }); } -*/ + function addTags(tags, current) { } \ No newline at end of file