Merge pull request #47 from RepoDevil/master
[WIP] Expanding user configuration
This commit is contained in:
commit
8eca5ee61d
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@ -6,6 +6,9 @@ on:
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@ -25,6 +28,11 @@ jobs:
|
||||
- name: Embed version info
|
||||
run: echo "${{ github.sha }}" > ConfusedPolarBear.Plugin.IntroSkipper/Configuration/version.txt
|
||||
|
||||
- name: Retrieve commit identification
|
||||
run: |
|
||||
GIT_HASH=$(git rev-parse --short HEAD)
|
||||
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
|
||||
@ -34,3 +42,20 @@ jobs:
|
||||
name: intro-skipper-${{ github.sha }}.dll
|
||||
path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Create archive
|
||||
uses: vimtor/action-zip@v1.1
|
||||
with:
|
||||
files: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
||||
dest: intro-skipper-${{ env.GIT_HASH }}.zip
|
||||
|
||||
- name: Publish prerelease
|
||||
uses: 8bitDream/action-github-releases@v1.0.0
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: preview
|
||||
prerelease: true
|
||||
title: intro-skipper-${{ env.GIT_HASH }}
|
||||
files: |
|
||||
intro-skipper-${{ env.GIT_HASH }}.zip
|
||||
|
@ -180,5 +180,5 @@ public class PluginConfiguration : BasePluginConfiguration
|
||||
/// <summary>
|
||||
/// Gets or sets the notification text sent after automatically skipping an introduction.
|
||||
/// </summary>
|
||||
public string AutoSkipNotificationText { get; set; } = "Automatically skipped intro";
|
||||
public string AutoSkipNotificationText { get; set; } = "Intro skipped";
|
||||
}
|
||||
|
@ -46,6 +46,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="CacheFingerprints" type="checkbox" is="emby-checkbox" />
|
||||
<span>Cache episode fingerprints</span>
|
||||
</label>
|
||||
|
||||
<div class="fieldDescription">
|
||||
If checked, episode fingerprints will be cached to the filesystem
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<details id="edl">
|
||||
<summary>EDL file generation</summary>
|
||||
|
||||
@ -234,7 +246,7 @@
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="PersistSkipButton" type="checkbox" is="emby-checkbox" />
|
||||
<span>Display skip through entire intro</span>
|
||||
<span>Display button for intro duration</span>
|
||||
</label>
|
||||
|
||||
<div class="fieldDescription">
|
||||
@ -311,7 +323,6 @@
|
||||
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
<br />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -321,6 +332,7 @@
|
||||
|
||||
<textarea id="supportBundle" rows="20" cols="75" readonly></textarea>
|
||||
</details>
|
||||
<br />
|
||||
|
||||
<details id="visualizer">
|
||||
<summary>Advanced</summary>
|
||||
@ -422,6 +434,7 @@
|
||||
<span id="intros"></span>
|
||||
</span>
|
||||
</details>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script src="configurationpage?name=visualizer.js"></script>
|
||||
@ -469,11 +482,12 @@
|
||||
|
||||
var booleanConfigurationFields = [
|
||||
"AnalyzeSeasonZero",
|
||||
"CacheFingerprints",
|
||||
"RegenerateEdlFiles",
|
||||
"AutoSkip",
|
||||
"SkipFirstEpisode",
|
||||
"SkipButtonVisible",
|
||||
"PersistSkipButton",
|
||||
"SkipButtonVisible"
|
||||
]
|
||||
|
||||
// visualizer elements
|
||||
@ -490,6 +504,23 @@
|
||||
|
||||
var windowHashInterval = 0;
|
||||
|
||||
var persistSkip = document.querySelector("input#PersistSkipButton");
|
||||
var showAdjustment = document.querySelector("input#ShowPromptAdjustment");
|
||||
var hideAdjustment = document.querySelector("input#HidePromptAdjustment");
|
||||
|
||||
// prevent setting unavailable options
|
||||
async function persistSkipChanged() {
|
||||
if (persistSkip.checked) {
|
||||
showAdjustment.style.display = 'none';
|
||||
hideAdjustment.style.display = 'none';
|
||||
} else {
|
||||
showAdjustment.style.display = 'block';
|
||||
hideAdjustment.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
persistSkip.addEventListener("change", persistSkipChanged);
|
||||
|
||||
// when the fingerprint visualizer opens, populate show names
|
||||
async function visualizerToggled() {
|
||||
if (!visualizer.open) {
|
||||
@ -768,6 +799,8 @@
|
||||
document.querySelector("#" + field).checked = config[field];
|
||||
}
|
||||
|
||||
persistSkipChanged();
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user