feat: add IIntroProvider for Wholphin/cinema-mode compatibility
All checks were successful
Publish Release / release (push) Successful in 1m34s

Registers TrailerIntroProvider as IIntroProvider. Queries fake-movie
items in the output folder and returns their local trailer extras
(LocalTrailers) as IntroInfo — mirroring jellyfin-plugin-cinemamode's
proven pattern so Wholphin plays the actual trailer, not the 3-second
black placeholder.

Recursion guard: items whose path starts with the output folder are
excluded from intro injection, so Wholphin's getIntros call on the
intro item itself returns empty. Server-scoped query bypasses library
visibility restrictions so hidden trailer libraries still work.

Adds TrailersPerMovie config option (default 1, 0 = disabled).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin
2026-06-09 13:03:34 -04:00
parent 3868876401
commit e84a897c27
6 changed files with 121 additions and 7 deletions

View File

@@ -38,5 +38,10 @@ namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Configuration
/// <summary>Maximum trailers to keep on disk. Oldest are deleted first when exceeded. 0 = unlimited.</summary>
public int MaxTotalTrailers { get; set; } = 50;
// ── IIntroProvider (Cinema Mode / Wholphin) ───────────────────────────
/// <summary>Number of trailers to inject before each movie via IIntroProvider. 0 = disabled.</summary>
public int TrailersPerMovie { get; set; } = 1;
}
}