Path sourceFilePath = Paths.get(archiveItem.getMediaFile());\r
try {\r
String fileName = sourceFilePath.getFileName().toString();\r
- String proxyName = fileName.substring(0, fileName.lastIndexOf(".")) + "S01" + fileName.substring(fileName.lastIndexOf("."));\r
- Path lowresSourcePath = Paths.get(sourceFilePath.getParent().toString(), EscortFiles.STATUSFOLDER, proxyName);\r
+ String proxyName = fileName.substring(0, fileName.lastIndexOf(".")) + "S01"\r
+ + fileName.substring(fileName.lastIndexOf("."));\r
+ Path lowresSourcePath = Paths.get(sourceFilePath.getParent().toString(), EscortFiles.STATUSFOLDER,\r
+ proxyName);\r
if (!lowresSourcePath.toFile().exists())\r
- throw new Exception("File not exists: " + lowresSourcePath);\r
+ throw new Exception("File does not exist: " + lowresSourcePath);\r
\r
Store lowresStore = getManager().getCurrentLowresStore();\r
StoreUri lowresStoreUri = lowresStore.getTargetStoreUri(RemoteStoreProtocol.LOCAL);\r
\r
Path subdirPath = null;\r
if (proxyName.indexOf(".") > 2) {\r
- subdirPath = Paths.get(proxyName.substring(0, 1), proxyName.substring(1, 2), proxyName.substring(2, 3), proxyName);\r
+ subdirPath = Paths.get(proxyName.substring(0, 1), proxyName.substring(1, 2), proxyName.substring(2, 3),\r
+ proxyName);\r
} else {\r
subdirPath = Paths.get(proxyName);\r
}\r
\r
EscortFiles.ensureUNCFolder(webPath, subDir);\r
lowresTargetPath = Paths.get(webPath, subDir);\r
- //Files.move(lowresSourcePath, lowresTargetPath);\r
+ // Files.move(lowresSourcePath, lowresTargetPath);\r
\r
- FFMpeg.hls_audio4ch(lowresSourcePath.toAbsolutePath().toString(), lowresTargetPath.toAbsolutePath().toString(), p -> {\r
- setProgress((int) p);\r
- });\r
+ FFMpeg.hls_audio4ch(lowresSourcePath.toAbsolutePath().toString(),\r
+ lowresTargetPath.toAbsolutePath().toString(), p -> {\r
+ setProgress((int) p);\r
+ });\r
\r
Path lowresHTTPPath = Paths.get(subDir, "index.m3u8");\r
- MediaFile mediaFile = getManager().createMediaFile(lowresHTTPPath.toString(), LOWRES_FILETYPE, lowresStore.getName());\r
+ MediaFile mediaFile = getManager().createMediaFile(lowresHTTPPath.toString(), LOWRES_FILETYPE,\r
+ lowresStore.getName());\r
mediaFile.setMediaId(mediaCubeMedia.getId());\r
getManager().add(mediaFile);\r
} catch (Exception e) {\r
logger.catching(e);\r
- logger.error(marker, "A HLS proxy létrehozása sikertelen a '{}' fájlból. A rendszer üzenete: {}", sourceFilePath, e.getMessage());\r
+ logger.error(marker, "A HLS proxy létrehozása sikertelen a '{}' fájlból. A rendszer üzenete: {}",\r
+ sourceFilePath, e.getMessage());\r
}\r
return null;\r
}\r