* 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
1 changed files with 5 additions and 3 deletions

View File

@ -155,12 +155,14 @@ public class AcoustID implements MusicIdentificationService {
return null; 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 // 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>(); List<String> command = new ArrayList<String>();
command.add(fpcalc); command.add(getChromaprintCommand());
for (File f : files) { for (File f : files) {
command.add(f.toString()); command.add(f.toString());
} }