diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index ce2d564d6..b55a05779 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -310,6 +310,7 @@ stages:
- bash: |
wget https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz
sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
+ chmod a+x _tests/fpcalc
displayName: Install fpcalc
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
- bash: |
diff --git a/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj
index 7413fa2ea..a8a8995dd 100644
--- a/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj
+++ b/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj
@@ -19,6 +19,9 @@
+
+
+
Files\1024.png
@@ -28,16 +31,10 @@
PreserveNewest
-
-
+
+
-
-
-
-
-
-
-
-
+
+
diff --git a/src/NzbDrone.Core/Lidarr.Core.csproj b/src/NzbDrone.Core/Lidarr.Core.csproj
index 168574e23..5c76c2092 100644
--- a/src/NzbDrone.Core/Lidarr.Core.csproj
+++ b/src/NzbDrone.Core/Lidarr.Core.csproj
@@ -28,21 +28,18 @@
+
+
+
Resources\Logo\64.png
-
-
+
+
-
-
-
-
-
-
-
-
+
+
diff --git a/src/NzbDrone.Core/Parser/FingerprintingService.cs b/src/NzbDrone.Core/Parser/FingerprintingService.cs
index 271e7df0f..33d7ca048 100644
--- a/src/NzbDrone.Core/Parser/FingerprintingService.cs
+++ b/src/NzbDrone.Core/Parser/FingerprintingService.cs
@@ -78,6 +78,20 @@ namespace NzbDrone.Core.Parser
private string GetFpcalcPath()
{
string path = null;
+
+ // Take the fpcalc from the install directory if it exists
+ path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "fpcalc");
+ if (OsInfo.IsWindows)
+ {
+ path += ".exe";
+ }
+
+ if (File.Exists(path))
+ {
+ return path;
+ }
+
+ // Otherwise search path for a candidate and check it works
if (OsInfo.IsLinux)
{
// must be on users path on Linux
@@ -103,25 +117,15 @@ namespace NzbDrone.Core.Parser
_logger.Debug("fpcalc not found");
return null;
}
+
+ return path;
}
else
{
// on OSX / Windows, we have put fpcalc in the application folder
- path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "fpcalc");
- if (OsInfo.IsWindows)
- {
- path += ".exe";
- }
-
- if (!File.Exists(path))
- {
- _logger.Warn("fpcalc missing from application directory");
- return null;
- }
+ _logger.Warn("fpcalc missing from application directory");
+ return null;
}
-
- _logger.Debug($"fpcalc path: {path}");
- return path;
}
private Version GetFpcalcVersion()
diff --git a/src/Runtimes/linux-arm/fpcalc b/src/Runtimes/linux-arm/fpcalc
new file mode 100755
index 000000000..4ed72632f
Binary files /dev/null and b/src/Runtimes/linux-arm/fpcalc differ
diff --git a/src/Runtimes/linux-arm64/fpcalc b/src/Runtimes/linux-arm64/fpcalc
new file mode 100755
index 000000000..4ed72632f
Binary files /dev/null and b/src/Runtimes/linux-arm64/fpcalc differ
diff --git a/src/Runtimes/linux-x64/fpcalc b/src/Runtimes/linux-x64/fpcalc
new file mode 100755
index 000000000..201872c71
Binary files /dev/null and b/src/Runtimes/linux-x64/fpcalc differ
diff --git a/src/Libraries/Fpcalc/chromaprint-fpcalc-1.4.3-macos-x86_64/fpcalc b/src/Runtimes/osx-x64/fpcalc
similarity index 100%
rename from src/Libraries/Fpcalc/chromaprint-fpcalc-1.4.3-macos-x86_64/fpcalc
rename to src/Runtimes/osx-x64/fpcalc
diff --git a/src/Libraries/Fpcalc/chromaprint-fpcalc-1.4.3-windows-x86_64/fpcalc.exe b/src/Runtimes/win-x64/fpcalc.exe
similarity index 100%
rename from src/Libraries/Fpcalc/chromaprint-fpcalc-1.4.3-windows-x86_64/fpcalc.exe
rename to src/Runtimes/win-x64/fpcalc.exe