From 3802cc69655f1a357f21233681223901b293b212 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 1 Apr 2014 12:59:49 +0000 Subject: [PATCH] * provide API method for getting or overriding the fpcalc command used --- source/net/sourceforge/filebot/web/AcoustID.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/net/sourceforge/filebot/web/AcoustID.java b/source/net/sourceforge/filebot/web/AcoustID.java index f8dbea17..45c498ea 100644 --- a/source/net/sourceforge/filebot/web/AcoustID.java +++ b/source/net/sourceforge/filebot/web/AcoustID.java @@ -155,12 +155,14 @@ public class AcoustID implements MusicIdentificationService { return null; } - public List> fpcalc(Iterable 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> fpcalc(Iterable files) throws IOException, InterruptedException { List command = new ArrayList(); - command.add(fpcalc); + command.add(getChromaprintCommand()); for (File f : files) { command.add(f.toString()); }