mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-22 15:58:52 -05:00
Refactor system exec
This commit is contained in:
parent
ed0aa79f9f
commit
504bb1132d
@ -20,10 +20,14 @@ import com.cedarsoftware.util.io.JsonWriter;
|
||||
|
||||
public class FFProbe implements MediaCharacteristics {
|
||||
|
||||
protected String getFFProbeCommand() {
|
||||
public String getFFProbeCommand() {
|
||||
return System.getProperty("net.filebot.media.ffprobe", "ffprobe");
|
||||
}
|
||||
|
||||
public String version() throws IOException {
|
||||
return execute(getFFProbeCommand(), "-show_program_version", "-hide_banner").toString();
|
||||
}
|
||||
|
||||
protected Map<String, Object> parse(File file) throws IOException, InterruptedException {
|
||||
String[] command = { getFFProbeCommand(), "-show_streams", "-show_format", "-print_format", "json", "-v", "error", file.getCanonicalPath() };
|
||||
|
||||
|
@ -192,6 +192,10 @@ public class AcoustIDClient implements MusicIdentificationService {
|
||||
return System.getProperty("net.filebot.AcoustID.fpcalc", "fpcalc");
|
||||
}
|
||||
|
||||
public String version() throws IOException {
|
||||
return execute(getChromaprintCommand(), "-version").toString();
|
||||
}
|
||||
|
||||
public Map<ChromaprintField, String> fpcalc(File file) throws IOException, InterruptedException {
|
||||
Map<ChromaprintField, String> fields = new EnumMap<ChromaprintField, String>(ChromaprintField.class);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user