mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +01:00
[IMPL] mkvtoolproperties
This commit is contained in:
5
src/main/java/Main.java
Normal file
5
src/main/java/Main.java
Normal file
@@ -0,0 +1,5 @@
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
||||
29
src/main/java/config/MKVToolProperties.java
Normal file
29
src/main/java/config/MKVToolProperties.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package config;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Log4j2
|
||||
public class MKVToolProperties {
|
||||
private String directoryPath;
|
||||
private Path mkvmergePath;
|
||||
private Path mkvpropeditPath;
|
||||
|
||||
public MKVToolProperties() {
|
||||
try(Stream<String> stream = Files.lines(Paths.get("mkvDirectoryPath"))) {
|
||||
directoryPath = stream.collect(Collectors.joining("\n"));
|
||||
}catch(IOException e) {
|
||||
log.fatal(e.getMessage());
|
||||
}
|
||||
|
||||
mkvmergePath = Paths.get(directoryPath + "mkvmerge.exe");
|
||||
mkvpropeditPath = Paths.get(directoryPath + "mkvpropedit.exe");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user