Skip to content

Add opt-in Intro Skipper analyzer integration - #35

Open
rlauuzo wants to merge 2 commits into
mainfrom
capy/skipme-authoritative-analyzer
Open

rlauuzo wants to merge 2 commits into
mainfrom
capy/skipme-authoritative-analyzer

Conversation

@rlauuzo

@rlauuzo rlauuzo commented Sep 11, 2026

Copy link
Copy Markdown
Member

Companion to intro-skipper/intro-skipper#975. Add an off-by-default Use Intro Skipper for segment analysis setting on SkipMe's Sync tab. After explicit opt-in, saving, and restarting Jellyfin, a compatible Intro Skipper receives SkipMe's local segment reader as an authoritative analyzer input instead of a second Jellyfin segment provider. Startup reads saved consent through Jellyfin's existing path/XML-serializer instances without building a second DI container; missing, legacy, disabled, or unreadable configuration stays standalone. Absent, incompatible, or failed host registration retains standalone behavior; the plugin has no Intro Skipper assembly dependency.

Successful syncs and integrated configuration changes queue Intro Skipper detection. At startup, the integrated handover waits for Jellyfin's scheduled tasks to initialize, queues an initial analysis of already-synced data, and retires only legacy SkipMe-owned Jellyfin rows. Cleanup retries failures without touching the local SkipMe database or other providers. Jellyfin already hides rows belonging to unregistered providers; Intro Skipper publishes its replacement segments asynchronously.

Keep Sync/Share features and series, season, movie, and specials restrictions. Integrated source reads also honor existing per-library SkipMe provider exclusions. The README describes enabling Intro Skipper at the library level and restarting to switch integration modes.

Validation: Release build with zero warnings/errors, 43 regression tests, TypeScript/Vite build, formatting, and git diff --check pass. A separate smoke harness passed fourteen assertions using the actual companion IntroSkipper.dll, including lazy singleton registration, exact timestamps read from SkipMe's SQLite store, library exclusions, missing/legacy configuration staying standalone, and opt-out taking effect on restart. Browser checks of the actual compiled dashboard verified default-off, enable/save/reload, disable/save, Share-tab isolation, preserved unrelated settings, and failed-load/save safety. Jellyfin startup/provider-discovery behavior was checked against its source; a full running Jellyfin deployment and playback were not exercised.

The new test project is included in the solution. CI now installs .NET 10 to match the existing target framework, and two XML parameter-documentation orderings are corrected for the existing StyleCop checks.

Open in Capy

Dashboard preview — the compiled settings UI with synthetic fixture data, not a live Jellyfin server.

SkipMe integration setting, off by default

@kilo-code-bot

kilo-code-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
web/src/main.ts 751 A stale asynchronous initialization can enable Save on a newly mounted page and allow stale configuration to be written.
Files Reviewed (23 files)
  • .github/workflows/build.yml
  • .github/workflows/release.yml
  • README.md
  • SkipMe.Db.Plugin.Tests/RegistrationTests.cs
  • SkipMe.Db.Plugin.Tests/SegmentHandoverServiceTests.cs
  • SkipMe.Db.Plugin.Tests/SegmentProviderTests.cs
  • SkipMe.Db.Plugin.Tests/SegmentRefreshServiceTests.cs
  • SkipMe.Db.Plugin.Tests/SkipMe.Db.Plugin.Tests.csproj
  • SkipMe.Db.Plugin.Tests/SyncSegmentsTaskTests.cs
  • SkipMe.Db.Plugin.sln
  • SkipMe.Db.Plugin/Configuration/PluginConfiguration.cs
  • SkipMe.Db.Plugin/Configuration/skipme-index.css
  • SkipMe.Db.Plugin/Configuration/skipme-index.js
  • SkipMe.Db.Plugin/Plugin.cs
  • SkipMe.Db.Plugin/PluginServiceRegistrator.cs
  • SkipMe.Db.Plugin/Providers/SegmentProvider.cs
  • SkipMe.Db.Plugin/Services/IntroSkipperRegistration.cs
  • SkipMe.Db.Plugin/Services/SegmentHandoverService.cs
  • SkipMe.Db.Plugin/Services/SegmentRefreshService.cs
  • SkipMe.Db.Plugin/Services/SkipMeApiClient.cs
  • SkipMe.Db.Plugin/SkipMe.Db.Plugin.csproj
  • SkipMe.Db.Plugin/Tasks/SyncSegmentsTask.cs
  • web/src/main.ts
  • web/src/styles/main.css
  • web/src/types.ts
Previous Review Summary (commit 20063e2)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 20063e2)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (19 files)
  • .github/workflows/build.yml
  • .github/workflows/release.yml
  • README.md
  • SkipMe.Db.Plugin.Tests/RegistrationTests.cs
  • SkipMe.Db.Plugin.Tests/SegmentHandoverServiceTests.cs
  • SkipMe.Db.Plugin.Tests/SegmentProviderTests.cs
  • SkipMe.Db.Plugin.Tests/SegmentRefreshServiceTests.cs
  • SkipMe.Db.Plugin.Tests/SkipMe.Db.Plugin.Tests.csproj
  • SkipMe.Db.Plugin.Tests/SyncSegmentsTaskTests.cs
  • SkipMe.Db.Plugin.sln
  • SkipMe.Db.Plugin/Plugin.cs
  • SkipMe.Db.Plugin/PluginServiceRegistrator.cs
  • SkipMe.Db.Plugin/Providers/SegmentProvider.cs
  • SkipMe.Db.Plugin/Services/IntroSkipperRegistration.cs
  • SkipMe.Db.Plugin/Services/SegmentHandoverService.cs
  • SkipMe.Db.Plugin/Services/SegmentRefreshService.cs
  • SkipMe.Db.Plugin/Services/SkipMeApiClient.cs
  • SkipMe.Db.Plugin/SkipMe.Db.Plugin.csproj
  • SkipMe.Db.Plugin/Tasks/SyncSegmentsTask.cs

Reviewed by gpt-5.6-luna · Input: 0 · Output: 0 · Cached: 0

@capy-ai capy-ai Bot changed the title Register SkipMe with compatible Intro Skipper analyzers Add opt-in Intro Skipper analyzer integration Sep 12, 2026
Comment thread web/src/main.ts
}
configLoaded = true;
const saveBtn = byId<HTMLButtonElement>("skipme-save-btn");
if (saveBtn) saveBtn.disabled = false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: A stale initialization can enable Save on a newly mounted page

init() is asynchronous, but mountPage() resets the page state and starts another init() without cancelling or versioning the previous one. If the old request resolves after remount, this new code sets configLoaded and enables the current page's Save button using the old configuration; saving then combines that stale load with the current page state and can overwrite the newly mounted page's settings, including the integration flag. Gate initialization updates by a mount/request generation (or cancel the prior initialization) before enabling controls.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@AbandonedCart

Copy link
Copy Markdown
Contributor

Is it really necessary to change the .net version, rewrite the entire plugin, and add an extensive test suite for this?

The original premise was a separate provider that can be used with or without intro skipper, but this seems to be heading toward making it an extension of intro skipper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants