git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorSweidan Omar <TFS\sweidan.omar>
Fri, 21 Jan 2022 08:55:01 +0000 (08:55 +0000)
committerSweidan Omar <TFS\sweidan.omar>
Fri, 21 Jan 2022 08:55:01 +0000 (08:55 +0000)
server/-product/production/MEDIAVIVANTIS/jobs/steps/TranscodeFFAStranStep.java

index a73ff663a339f832b453e9fcaa5623dda6ecae9d..d09685bc8f015d65a3f1f8a552c79585d6de81d7 100644 (file)
@@ -70,7 +70,7 @@ public class TranscodeFFAStranStep extends JobStep {
                try {\r
                        String targetFileName = FilenameUtils.removeExtension(sourceFileName) + MP4EXT;\r
                        targetPath = Paths.get(localLowresTargetPath, targetFileName);\r
-                       if (!targetPath.toFile().exists()) {\r
+                       if (!Files.exists(targetPath)) {\r
                                //                              jobRuntime.setDescription(String.format("%s: %s", jobRuntime.getDescription(), details));\r
                                jobRuntime.setDescription(String.format("%s transzkódolása", details));\r
                                String sourceFile = Paths.get(globalHiresSourcePath, sourceFileName).toString();\r
@@ -85,7 +85,7 @@ public class TranscodeFFAStranStep extends JobStep {
 \r
                        //a sikeres transzkod utan nem mindig van ott egybol a fajl\r
                        long started = System.currentTimeMillis();\r
-                       while (!targetPath.toFile().exists()) {\r
+                       while (!Files.exists(targetPath)) {\r
                                long current = System.currentTimeMillis();\r
                                //max 5 perc varakozas\r
                                if (current - started > 5 * 60 * 1000)\r
@@ -108,7 +108,7 @@ public class TranscodeFFAStranStep extends JobStep {
                                logger.catching(e);\r
                        }\r
                        try {\r
-                               if (deleteSource && targetPath != null && targetPath.toFile().exists())\r
+                               if (deleteSource && targetPath != null && Files.exists(targetPath))\r
                                        Files.delete(targetPath);\r
                        } catch (Exception e) {\r
                                logger.catching(e);\r
@@ -131,7 +131,7 @@ public class TranscodeFFAStranStep extends JobStep {
                        }\r
                        lowresPath = Paths.get(webPath, targetPath);\r
                        int version = 1;\r
-                       while (lowresPath.toFile().exists()) {\r
+                       while (Files.exists(lowresPath)) {\r
                                String fileName = transcodedFileName + version + MP4EXT;\r
                                lowresPath = Paths.get(lowresPath.toString().replace(transcodedFileName, fileName));\r
                                targetPath = targetPath.replace(transcodedFileName, fileName);\r