diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs index 21f142c..c969f61 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Chromaprint.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; @@ -14,6 +13,8 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper; /// public static class Chromaprint { + private static bool _loggedVersionInformation; + /// /// Gets or sets the logger. /// @@ -27,6 +28,14 @@ public static class Chromaprint { try { + // Log the output of "ffmpeg -version" at the first call to this function + if (!_loggedVersionInformation) + { + _loggedVersionInformation = true; + var version = Encoding.UTF8.GetString(GetOutput("-version", 2000)); + Logger?.LogDebug("ffmpeg version information: {Version}", version); + } + // First, validate that the installed version of ffmpeg supports chromaprint at all. var muxers = Encoding.UTF8.GetString(GetOutput("-muxers", 2000)); Logger?.LogTrace("ffmpeg muxers: {Muxers}", muxers); @@ -71,7 +80,7 @@ public static class Chromaprint // Try to load this episode from cache before running ffmpeg. if (LoadCachedFingerprint(episode, out uint[] cachedFingerprint)) { - Logger?.LogDebug("Fingerprint cache hit on {File}", episode.Path); + Logger?.LogTrace("Fingerprint cache hit on {File}", episode.Path); return cachedFingerprint; } diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs index 5c7543c..5113ef4 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs @@ -67,7 +67,10 @@ public class Entrypoint : IServerEntryPoint _logger.LogError("Unable to run startup enqueue: {Exception}", ex); } - _logger.LogDebug("Total enqueued seasons: {Count}", Plugin.Instance!.AnalysisQueue.Count); + _logger.LogDebug( + "Total enqueued seasons: {Count} ({Episodes} episodes)", + Plugin.Instance!.AnalysisQueue.Count, + Plugin.Instance!.TotalQueued); return Task.CompletedTask; } diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs index b4078ec..6f07285 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs @@ -56,13 +56,14 @@ public class QueueManager { if (folder.CollectionType != CollectionTypeOptions.TvShows) { + _logger.LogDebug("Not analyzing library \"{Name}\": not a TV show library", folder.Name); continue; } // If libraries have been selected for analysis, ensure this library was selected. if (selectedLibraries.Count > 0 && !selectedLibraries.Contains(folder.Name)) { - _logger.LogDebug("Not analyzing library \"{Name}\"", folder.Name); + _logger.LogDebug("Not analyzing library \"{Name}\": not selected by user", folder.Name); continue; }