Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ad186140bd |
@ -163,6 +163,11 @@ public class PluginConfiguration : BasePluginConfiguration
|
||||
/// </summary>
|
||||
public bool SkipFirstEpisode { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the introduction in the last episode of a season should be ignored.
|
||||
/// </summary>
|
||||
public bool SkipLastEpisode { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the skip button should be displayed for the duration of the intro.
|
||||
/// </summary>
|
||||
|
@ -375,6 +375,18 @@
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div id="divSkipLastEpisode" class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="SkipLastEpisode" type="checkbox" is="emby-checkbox" />
|
||||
<span>Play intro for last episode of a season</span>
|
||||
</label>
|
||||
|
||||
<div class="fieldDescription">
|
||||
If checked, auto skip will play the introduction of the last episode in a season.<br />
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div id="divSecondsOfIntroStartToPlay" class="inputContainer">
|
||||
<label class="inputLabel inputLabelUnfocused" for="SecondsOfIntroStartToPlay">
|
||||
Intro skip delay (in seconds)
|
||||
@ -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';
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user