Fix version check
This commit is contained in:
parent
552a1fdf53
commit
bb2c9a30e3
@ -3,8 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>ConfusedPolarBear.Plugin.IntroSkipper</RootNamespace>
|
||||
<AssemblyVersion>0.0.0.2</AssemblyVersion>
|
||||
<FileVersion>0.0.0.2</FileVersion>
|
||||
<AssemblyVersion>0.0.0.3</AssemblyVersion>
|
||||
<FileVersion>0.0.0.3</FileVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
|
@ -14,11 +14,6 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper;
|
||||
/// </summary>
|
||||
public static class FPCalc
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimum fpcalc version that can be used.
|
||||
/// </summary>
|
||||
private static Version minimumFPCalcVersion = new Version(1, 4, 3);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the logger.
|
||||
/// </summary>
|
||||
@ -32,29 +27,9 @@ public static class FPCalc
|
||||
{
|
||||
try
|
||||
{
|
||||
var rawVersion = GetOutput("-version", 2000).TrimEnd();
|
||||
if (!rawVersion.StartsWith("fpcalc version", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Logger?.LogDebug("raw fpcalc version: {Version}", rawVersion);
|
||||
|
||||
var version = Version.Parse(rawVersion.AsSpan(15));
|
||||
|
||||
Logger?.LogDebug("Found fpcalc version {Version}", version);
|
||||
|
||||
var okay = version >= minimumFPCalcVersion;
|
||||
|
||||
if (!okay)
|
||||
{
|
||||
Logger?.LogError(
|
||||
"installed fpcalc version of {Version} is too old (minimum is {Minimum})",
|
||||
version,
|
||||
minimumFPCalcVersion);
|
||||
}
|
||||
|
||||
return okay;
|
||||
var version = GetOutput("-version", 2000).TrimEnd();
|
||||
Logger?.LogInformation("fpcalc -version: {Version}", version);
|
||||
return version.StartsWith("fpcalc version", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@ -21,8 +21,16 @@
|
||||
"changelog": "- decrease audio fingerprint comparison time\n- analyze two seasons simultaneously",
|
||||
"targetAbi": "10.8.0.0",
|
||||
"sourceUrl": "https://github.com/ConfusedPolarBear/intro-skipper/releases/download/v0.0.2/intro-skipper-v0.0.2.zip",
|
||||
"checksum": "83c3e3618a6c37c2767e5bfea64ef515",
|
||||
"timestamp": "2022-05-22T00:05:12Z"
|
||||
"checksum": "83c3e3618a6c37c2767e5bfea64ef515",
|
||||
"timestamp": "2022-05-22T00:05:12Z"
|
||||
},
|
||||
{
|
||||
"version": "0.0.0.3",
|
||||
"changelog": "- fix version check",
|
||||
"targetAbi": "10.8.0.0",
|
||||
"sourceUrl": "https://github.com/ConfusedPolarBear/intro-skipper/releases/download/v0.0.3/intro-skipper-v0.0.3.zip",
|
||||
"checksum": "4d9eee379679c13c351d64f9d8c52a23",
|
||||
"timestamp": "2022-05-22T03:43:29Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user