Rename files
This commit is contained in:
parent
4b99c934b4
commit
55e04efb8d
@ -7,14 +7,12 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace ConfusedPolarBear.Plugin.IntroSkipper.Tests;
|
||||
|
||||
// TODO: rename
|
||||
|
||||
public class TestFPCalc
|
||||
public class TestAudioFingerprinting
|
||||
{
|
||||
[Fact]
|
||||
public void TestInstallationCheck()
|
||||
{
|
||||
Assert.True(FPCalc.CheckFFmpegVersion());
|
||||
Assert.True(Chromaprint.CheckFFmpegVersion());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -58,7 +56,7 @@ public class TestFPCalc
|
||||
3472417825, 3395841056, 3458735136, 3341420624, 1076496560, 1076501168, 1076501136, 1076497024
|
||||
};
|
||||
|
||||
var actual = FPCalc.Fingerprint(queueEpisode("audio/big_buck_bunny_intro.mp3"));
|
||||
var actual = Chromaprint.Fingerprint(queueEpisode("audio/big_buck_bunny_intro.mp3"));
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
|
@ -7,14 +7,12 @@ using System.IO;
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
// TODO: rename
|
||||
|
||||
namespace ConfusedPolarBear.Plugin.IntroSkipper;
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper for libchromaprint.
|
||||
/// </summary>
|
||||
public static class FPCalc
|
||||
public static class Chromaprint
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the logger.
|
@ -105,7 +105,7 @@ public class VisualizationController : ControllerBase
|
||||
{
|
||||
if (needle.EpisodeId == id)
|
||||
{
|
||||
return FPCalc.Fingerprint(needle);
|
||||
return Chromaprint.Fingerprint(needle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,10 +49,10 @@ public class Entrypoint : IServerEntryPoint
|
||||
/// <returns>Task.</returns>
|
||||
public Task RunAsync()
|
||||
{
|
||||
FPCalc.Logger = _logger;
|
||||
Chromaprint.Logger = _logger;
|
||||
|
||||
// Assert that ffmpeg with chromaprint is installed
|
||||
if (!FPCalc.CheckFFmpegVersion())
|
||||
if (!Chromaprint.CheckFFmpegVersion())
|
||||
{
|
||||
_logger.LogError("ffmpeg with chromaprint is not installed on this system - episodes will not be analyzed");
|
||||
return Task.CompletedTask;
|
||||
|
@ -274,8 +274,8 @@ public class FingerprinterTask : IScheduledTask
|
||||
/// <returns>Intros for the first and second episodes.</returns>
|
||||
public (Intro Lhs, Intro Rhs) FingerprintEpisodes(QueuedEpisode lhsEpisode, QueuedEpisode rhsEpisode)
|
||||
{
|
||||
var lhsFingerprint = FPCalc.Fingerprint(lhsEpisode);
|
||||
var rhsFingerprint = FPCalc.Fingerprint(rhsEpisode);
|
||||
var lhsFingerprint = Chromaprint.Fingerprint(lhsEpisode);
|
||||
var rhsFingerprint = Chromaprint.Fingerprint(rhsEpisode);
|
||||
|
||||
// Cache the fingerprints for quicker recall in the second pass (if one is needed).
|
||||
lock (_fingerprintCacheLock)
|
||||
|
Loading…
x
Reference in New Issue
Block a user