From b0303308575b347f110f57fc4270ea02c5aa7a39 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Fri, 1 Mar 2024 11:40:05 -0500 Subject: [PATCH 1/5] Publish prerelease on new changes --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d4dd11..6cdd000 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: ${{ env.GIT_HASH }} + prerelease: true + title: intro-skipper-${{ env.GIT_HASH }} + files: | + intro-skipper-${{ env.GIT_HASH }}.zip From 8841fd34480e93af0b9d6e406f2db848580c0c53 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Fri, 1 Mar 2024 12:46:23 -0500 Subject: [PATCH 2/5] Make cache setting user configurable --- .../Configuration/PluginConfiguration.cs | 2 +- .../Configuration/configPage.html | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs index fcbfa63..294f565 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs @@ -180,5 +180,5 @@ public class PluginConfiguration : BasePluginConfiguration /// /// Gets or sets the notification text sent after automatically skipping an introduction. /// - public string AutoSkipNotificationText { get; set; } = "Automatically skipped intro"; + public string AutoSkipNotificationText { get; set; } = "Intro skipped"; } diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html index 09f3413..c47b763 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html @@ -46,6 +46,18 @@ +
+ + +
+ If checked, episode fingerprints will be cached to the filesystem +
+
+
+
EDL file generation @@ -469,11 +481,12 @@ var booleanConfigurationFields = [ "AnalyzeSeasonZero", + "CacheFingerprints", "RegenerateEdlFiles", "AutoSkip", "SkipFirstEpisode", - "SkipButtonVisible", "PersistSkipButton", + "SkipButtonVisible" ] // visualizer elements From 99a2c8c5d85a12226f680020a1febd47056d5a9f Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Fri, 1 Mar 2024 13:27:09 -0500 Subject: [PATCH 3/5] Group prereleases under a single tag --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6cdd000..dadaf09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: if: github.event_name != 'pull_request' with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: ${{ env.GIT_HASH }} + automatic_release_tag: preview prerelease: true title: intro-skipper-${{ env.GIT_HASH }} files: | From 8c8b8ead08ceb53eaa5d64c18c638d9384babeef Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Fri, 1 Mar 2024 14:45:27 -0500 Subject: [PATCH 4/5] Hide unused settings when unused --- .../Configuration/configPage.html | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html index c47b763..fca3706 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html @@ -246,7 +246,7 @@
@@ -503,6 +503,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) { @@ -781,6 +798,8 @@ document.querySelector("#" + field).checked = config[field]; } + persistSkipChanged(); + Dashboard.hideLoadingMsg(); }); }); From c3a9a33526ba3d1196a51a4c5d3e2cb7bb626bdd Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Fri, 1 Mar 2024 15:00:18 -0500 Subject: [PATCH 5/5] Add padding to make navigation easier --- .../Configuration/configPage.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html index fca3706..bc6b5f6 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html @@ -323,7 +323,6 @@ -
@@ -333,6 +332,7 @@
+
Advanced @@ -434,6 +434,7 @@
+