diff --git a/.gitignore b/.gitignore
index 295855b..6908286 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,7 @@ BenchmarkDotNet.Artifacts/
# Ignore pre compiled web interface
docker/dist
+
+# Visual Studio
+.vs/
+UpgradeLog*.htm
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs
index b22e428..763d461 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs
@@ -7,8 +7,8 @@ using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
-using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Entities;
+using Microsoft.Extensions.Logging;
///
/// Chapter name analyzer.
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChromaprintAnalyzer.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChromaprintAnalyzer.cs
index c230c1b..2a03321 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChromaprintAnalyzer.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChromaprintAnalyzer.cs
@@ -275,10 +275,10 @@ public class ChromaprintAnalyzer : IMediaFileAnalyzer
{
var modifiedPoint = (uint)(originalPoint + i);
- if (rhsIndex.ContainsKey(modifiedPoint))
+ if (rhsIndex.TryGetValue(modifiedPoint, out var value))
{
var lhsFirst = (int)lhsIndex[originalPoint];
- var rhsFirst = (int)rhsIndex[modifiedPoint];
+ var rhsFirst = (int)value;
indexShifts.Add(rhsFirst - lhsFirst);
}
}
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
index 294f565..0d4407e 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics;
using MediaBrowser.Model.Plugins;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
@@ -181,4 +182,14 @@ public class PluginConfiguration : BasePluginConfiguration
/// Gets or sets the notification text sent after automatically skipping an introduction.
///
public string AutoSkipNotificationText { get; set; } = "Intro skipped";
+
+ ///
+ /// Gets or sets the number of threads for an ffmpeg process.
+ ///
+ public int ProcessThreads { get; set; } = 0;
+
+ ///
+ /// Gets or sets the relative priority for an ffmpeg process.
+ ///
+ public ProcessPriorityClass ProcessPriority { get; set; } = ProcessPriorityClass.BelowNormal;
}
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
index 0475d82..151a77d 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
@@ -59,77 +59,8 @@
-
-
-
-
- If checked, episode fingerprints will be cached to the filesystem
-
- WARNING: Disabling cache may result in lengthy detection
-
-
-
-
-
- EDL file generation
-
-
-
-
-
-
-
- If set to a value other than None, specifies which action to write to
- MPlayer compatible EDL files
- alongside your episode files.
-
- If this value is changed after EDL files are generated, you must check the
- "Regenerate EDL files" checkbox below.
-
-
-
-
-
-
-
- If checked, the plugin will overwrite all EDL files associated with
- your episodes with the currently discovered introduction timestamps and EDL action.
-
+ If set to a value other than None, specifies which action to write to
+ MPlayer compatible EDL files
+ alongside your episode files.
+
+ If this value is changed after EDL files are generated, you must check the
+ "Regenerate EDL files" checkbox below.
+
+
+
+
+
+
+
+ If checked, the plugin will overwrite all EDL files associated with
+ your episodes with the currently discovered introduction timestamps and EDL action.
+
+ If checked, episode fingerprints will be saved on the filesystem to improve analysis speed.
+
+ WARNING: May result in lengthy detection! Not recommended for large libraries!
+
+
+
+
+
+
+
+
+
+ Sets the relative priority of the analysis ffmpeg process to other parallel operations
+ (ie. transcoding, chapter detection, etc).
+
+
+
+
+
+
+
+ Number of simultaneous processes to use for ffmpeg operations.
+
+ This value is most often defined as 1 thread per CPU core,
+ but setting a value of 0 (default) will use the maximum threads available.
+