diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
index 033a2be..b42a8e8 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs
@@ -163,6 +163,11 @@ public class PluginConfiguration : BasePluginConfiguration
///
public bool SkipFirstEpisode { get; set; } = true;
+ ///
+ /// Gets or sets a value indicating whether the introduction in the last episode of a season should be ignored.
+ ///
+ public bool SkipLastEpisode { get; set; } = false;
+
///
/// Gets or sets a value indicating whether the skip button should be displayed for the duration of the intro.
///
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
index a0101aa..5cba275 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
@@ -375,6 +375,18 @@
+
+
+
+
+ If checked, auto skip will play the introduction of the last episode in a season.
+
+
+
+
@@ -817,6 +829,7 @@
"AutoSkip",
"AutoSkipCredits",
"SkipFirstEpisode",
+ "SkipLastEpisode",
"PersistSkipButton",
"SkipButtonVisible"
]
@@ -850,6 +863,7 @@
var selectAllLibraries = document.querySelector("input#SelectAllLibraries");
var librariesContainer = document.querySelector("div.folderAccessListContainer");
var skipFirstEpisode = document.querySelector("div#divSkipFirstEpisode");
+ var skipLastEpisode = document.querySelector("div#divSkipLastEpisode");
var secondsOfIntroStartToPlay = document.querySelector("div#divSecondsOfIntroStartToPlay");
var autoSkipClientList = document.getElementById("AutoSkipClientList");
var secondsOfCreditsStartToPlay = document.querySelector("div#divSecondsOfCreditsStartToPlay");
@@ -892,10 +906,12 @@
function autoSkipChanged() {
if (autoSkip.checked) {
skipFirstEpisode.style.display = 'unset';
+ skipLastEpisode.style.display = 'unset';
autoSkipNotificationText.style.display = 'unset';
secondsOfIntroStartToPlay.style.display = 'unset';
} else {
skipFirstEpisode.style.display = 'none';
+ skipLastEpisode.style.display = 'none';
autoSkipNotificationText.style.display = 'none';
secondsOfIntroStartToPlay.style.display = 'none';
}
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs
index 13c7dc8..30f4a71 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs
@@ -87,12 +87,18 @@ public class AutoSkip(
return;
}
- // If this is the first episode in the season, and SkipFirstEpisode is false, pretend that we've already sent the seek command for this playback session.
+ // If this is the first episode in the season, and SkipFirstEpisode is true, pretend that we've already sent the seek command for this playback session.
if (Plugin.Instance!.Configuration.SkipFirstEpisode && episodeNumber == 1)
{
newState = true;
}
+ // If this is the last episode in the season, and SkipLastEpisode is true, pretend that we've already sent the seek command for this playback session.
+ if (Plugin.Instance!.Configuration.SkipLastEpisode && episodeNumber == 1)
+ {
+ newState = true;
+ }
+
// Reset the seek command state for this device.
lock (_sentSeekCommandLock)
{