diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
index 59b8583..9a19b30 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html
@@ -357,7 +357,8 @@
- If checked, intros will be automatically skipped for Apps without Skip Button.
+ If checked, intros will be automatically skipped for all clients.
+ Individual clients can override this setting from the client player options.
If you access Jellyfin through a reverse proxy, it must be configured to proxy websockets.
@@ -392,7 +393,8 @@
- If checked, credits will be automatically skipped for Apps without Skip Button.
+ If checked, credits will be automatically skipped for all clients.
+ Individual clients can override this setting from the client player options.
If you access Jellyfin through a reverse proxy, it must be configured to proxy websockets.
@@ -408,6 +410,23 @@
+
+
+
+
Auto Skip Client List
@@ -416,23 +435,6 @@
-
-
-
-
@@ -816,6 +818,7 @@
var windowHashInterval = 0;
var autoSkip = document.querySelector("input#AutoSkip");
+ var skipButtonVisibleLabel = document.getElementById("SkipButtonVisibleLabel");
var selectAllLibraries = document.querySelector("input#SelectAllLibraries");
var librariesContainer = document.querySelector("div.folderAccessListContainer");
var skipFirstEpisode = document.querySelector("div#divSkipFirstEpisode");
@@ -826,6 +829,25 @@
var autoSkipCredits = document.querySelector("input#AutoSkipCredits");
var autoSkipCreditsNotificationText = document.querySelector("div#divAutoSkipCreditsNotificationText");
+ function skipButtonVisibleText() {
+ if (autoSkip.checked && autoSkipCredits.checked) {
+ autoSkipClientList.style.display = 'none';
+ skipButtonVisibleLabel.textContent = "Button unavailable due to auto skip";
+ } else if (autoSkip.checked) {
+ autoSkipClientList.style.display = 'unset';
+ autoSkipClientList.style.width = '100%';
+ skipButtonVisibleLabel.textContent = "Show skip credit button";
+ } else if (autoSkipCredits.checked) {
+ autoSkipClientList.style.display = 'unset';
+ autoSkipClientList.style.width = '100%';
+ skipButtonVisibleLabel.textContent = "Show skip intro button";
+ } else {
+ autoSkipClientList.style.display = 'unset';
+ autoSkipClientList.style.width = '100%';
+ skipButtonVisibleLabel.textContent = "Show skip intro / credit button";
+ }
+ }
+
function autoSkipChanged() {
if (autoSkip.checked) {
skipFirstEpisode.style.display = 'unset';
@@ -836,7 +858,7 @@
autoSkipNotificationText.style.display = 'none';
secondsOfIntroStartToPlay.style.display = 'none';
}
- clientListVisible();
+ skipButtonVisibleText();
}
autoSkip.addEventListener("change", autoSkipChanged);
@@ -849,20 +871,11 @@
autoSkipCreditsNotificationText.style.display = 'none';
secondsOfCreditsStartToPlay.style.display = 'none';
}
- clientListVisible();
+ skipButtonVisibleText();
}
autoSkipCredits.addEventListener("change", autoSkipCreditsChanged);
- function clientListVisible() {
- if (autoSkip.checked || autoSkipCredits.checked) {
- autoSkipClientList.style.display = 'unset';
- autoSkipClientList.style.width = '100%';
- } else {
- autoSkipClientList.style.display = 'none';
- }
- }
-
function selectAllLibrariesChanged() {
if (selectAllLibraries.checked) {
librariesContainer.style.display = 'none';
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs
index c3cc3d2..ee75ffb 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkip.cs
@@ -44,10 +44,10 @@ public class AutoSkip(
private void AutoSkipChanged(object? sender, BasePluginConfiguration e)
{
var configuration = (PluginConfiguration)e;
- var newState = configuration.AutoSkip;
+ _clientList = [.. configuration.ClientList.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)];
+ var newState = configuration.AutoSkip || (configuration.SkipButtonVisible && _clientList.Count > 0);
_logger.LogDebug("Setting playback timer enabled to {NewState}", newState);
_playbackTimer.Enabled = newState;
- _clientList = [.. configuration.ClientList.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)];
}
private void UserDataManager_UserDataSaved(object? sender, UserDataSaveEventArgs e)
@@ -105,7 +105,7 @@ public class AutoSkip(
private void PlaybackTimer_Elapsed(object? sender, ElapsedEventArgs e)
{
- foreach (var session in _sessionManager.Sessions.Where(s => _clientList.Contains(s.Client, StringComparer.OrdinalIgnoreCase)))
+ foreach (var session in _sessionManager.Sessions.Where(s => Plugin.Instance!.Configuration.AutoSkip || (Plugin.Instance!.Configuration.SkipButtonVisible && _clientList.Contains(s.Client, StringComparer.OrdinalIgnoreCase))))
{
var deviceId = session.DeviceId;
var itemId = session.NowPlayingItem.Id;
diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkipCredits.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkipCredits.cs
index 539e9a2..36bdb04 100644
--- a/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkipCredits.cs
+++ b/ConfusedPolarBear.Plugin.IntroSkipper/Services/AutoSkipCredits.cs
@@ -44,10 +44,10 @@ public class AutoSkipCredits(
private void AutoSkipCreditChanged(object? sender, BasePluginConfiguration e)
{
var configuration = (PluginConfiguration)e;
- var newState = configuration.AutoSkipCredits;
+ _clientList = [.. configuration.ClientList.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)];
+ var newState = configuration.AutoSkipCredits || (configuration.SkipButtonVisible && _clientList.Count > 0);
_logger.LogDebug("Setting playback timer enabled to {NewState}", newState);
_playbackTimer.Enabled = newState;
- _clientList = [.. configuration.ClientList.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)];
}
private void UserDataManager_UserDataSaved(object? sender, UserDataSaveEventArgs e)
@@ -105,7 +105,7 @@ public class AutoSkipCredits(
private void PlaybackTimer_Elapsed(object? sender, ElapsedEventArgs e)
{
- foreach (var session in _sessionManager.Sessions.Where(s => _clientList.Contains(s.Client, StringComparer.OrdinalIgnoreCase)))
+ foreach (var session in _sessionManager.Sessions.Where(s => Plugin.Instance!.Configuration.AutoSkipCredits || (Plugin.Instance!.Configuration.SkipButtonVisible && _clientList.Contains(s.Client, StringComparer.OrdinalIgnoreCase))))
{
var deviceId = session.DeviceId;
var itemId = session.NowPlayingItem.Id;