1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* provide API method for getting or overriding the fpcalc command used

This commit is contained in:
Reinhard Pointner 2014-04-01 12:59:49 +00:00
parent 37d55d4867
commit 3802cc6965

View File

@ -155,12 +155,14 @@ public class AcoustID implements MusicIdentificationService {
return null;
}
public List<Map<String, String>> fpcalc(Iterable<File> files) throws IOException, InterruptedException {
public String getChromaprintCommand() {
// use fpcalc executable path as specified by the cmdline or default to "fpcalc" and let the shell figure it out
String fpcalc = System.getProperty("net.sourceforge.filebot.AcoustID.fpcalc", "fpcalc");
return System.getProperty("net.sourceforge.filebot.AcoustID.fpcalc", "fpcalc");
}
public List<Map<String, String>> fpcalc(Iterable<File> files) throws IOException, InterruptedException {
List<String> command = new ArrayList<String>();
command.add(fpcalc);
command.add(getChromaprintCommand());
for (File f : files) {
command.add(f.toString());
}