Merge pull request #54 from RepoDevil/master

Hide unused settings when unused (PT 2)
This commit is contained in:
TwistedUmbrellaX 2024-03-02 21:17:56 -05:00 committed by GitHub
commit 41459228d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 53 additions and 24 deletions

View File

@ -45,6 +45,7 @@ jobs:
- name: Create archive
uses: vimtor/action-zip@v1.1
if: github.event_name != 'pull_request'
with:
files: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
dest: intro-skipper-${{ env.GIT_HASH }}.zip

View File

@ -151,7 +151,10 @@ public class ChapterAnalyzer : IMediaFileAnalyzer
matchingChapter = new(episode.EpisodeId, currentRange);
_logger.LogTrace("{Base}: okay", baseMessage);
break;
if (i > 0)
{
break;
}
}
return matchingChapter;

View File

@ -224,19 +224,6 @@
<fieldset class="verticalSection-extrabottompadding">
<legend>Playback</legend>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="SkipButtonVisible" type="checkbox" is="emby-checkbox" />
<span>Show skip intro button</span>
</label>
<div class="fieldDescription">
If checked, a skip button will be displayed at the start of an episode's introduction.
<strong>This setting only applies to the web interface.</strong>
<br />
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="AutoSkip" type="checkbox" is="emby-checkbox" />
@ -250,7 +237,7 @@
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<div id="divSkipFirstEpisode" class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="SkipFirstEpisode" type="checkbox" is="emby-checkbox" />
<span>Ignore intro in the first episode of a season</span>
@ -261,6 +248,19 @@
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="SkipButtonVisible" type="checkbox" is="emby-checkbox" />
<span>Show skip intro button</span>
</label>
<div class="fieldDescription">
If checked, a skip button will be displayed at the start of an episode's introduction.
<strong>This setting only applies to the web interface.</strong>
<br />
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="PersistSkipButton" type="checkbox" is="emby-checkbox" />
@ -272,7 +272,7 @@
</div>
</div>
<div class="inputContainer">
<div id="divShowPromptAdjustment" class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="ShowPromptAdjustment">
Skip prompt offset (in seoncds)
</label>
@ -282,7 +282,7 @@
</div>
</div>
<div class="inputContainer">
<div id="divHidePromptAdjustment" class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="HidePromptAdjustment">
Skip prompt timeout (in seconds)
</label>
@ -326,7 +326,7 @@
</div>
</div>
<div class="inputContainer">
<div id="divAutoSkipNotificationText" class="inputContainer">
<label class="inputLabel" for="AutoSkipNotificationText">
Automatic skip notification message
</label>
@ -350,13 +350,13 @@
<legend>Advanced</legend>
<details id="support">
<summary>Support Bundle</summary>
<summary>Support Bundle Info</summary>
<textarea id="supportBundle" rows="20" cols="75" readonly></textarea>
</details>
<details id="visualizer">
<summary>Fingerprint Editor</summary>
<summary>Manage Fingerprints</summary>
<br />
<h3 style="margin:0">Select episodes to manage</h3>
@ -528,9 +528,25 @@
var windowHashInterval = 0;
var autoSkip = document.querySelector("input#AutoSkip");
var skipFirstEpisode = document.querySelector("div#divSkipFirstEpisode");
var autoSkipNotificationText = document.querySelector("div#divAutoSkipNotificationText");
async function autoSkipChanged() {
if (autoSkip.checked) {
skipFirstEpisode.style.display = 'block';
autoSkipNotificationText.style.display = 'block';
} else {
skipFirstEpisode.style.display = 'none';
autoSkipNotificationText.style.display = 'none';
}
}
autoSkip.addEventListener("change", autoSkipChanged);
var persistSkip = document.querySelector("input#PersistSkipButton");
var showAdjustment = document.querySelector("input#ShowPromptAdjustment");
var hideAdjustment = document.querySelector("input#HidePromptAdjustment");
var showAdjustment = document.querySelector("div#divShowPromptAdjustment");
var hideAdjustment = document.querySelector("div#divHidePromptAdjustment");
// prevent setting unavailable options
async function persistSkipChanged() {
@ -823,6 +839,7 @@
document.querySelector("#" + field).checked = config[field];
}
autoSkipChanged();
persistSkipChanged();
Dashboard.hideLoadingMsg();

View File

@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>ConfusedPolarBear.Plugin.IntroSkipper</RootNamespace>
<AssemblyVersion>0.1.10.0</AssemblyVersion>
<FileVersion>0.1.10.0</FileVersion>
<AssemblyVersion>0.1.14.0</AssemblyVersion>
<FileVersion>0.1.14.0</FileVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>

View File

@ -8,6 +8,14 @@
"category": "General",
"imageUrl": "https://raw.githubusercontent.com/jumoog/intro-skipper/master/images/logo.png",
"versions": [
{
"version": "0.1.14.0",
"changelog": "- See the full changelog at [GitHub](https://github.com/jumoog/intro-skipper/blob/master/CHANGELOG.md)\n",
"targetAbi": "10.8.4.0",
"sourceUrl": "https://github.com/jumoog/intro-skipper/releases/download/v0.1.14/intro-skipper-v0.1.14.zip",
"checksum": "704ecc32588243545c44b2eed130b033",
"timestamp": "2024-03-02T21:10:57Z"
},
{
"version": "0.1.13.0",
"changelog": "- See the full changelog at [GitHub](https://github.com/jumoog/intro-skipper/blob/master/CHANGELOG.md)\n",