All checks were successful
Publish Release / release (push) Successful in 23s
Trailer selection now supports three optional filters:
- Genre match: prefer trailers whose fake-movie genre overlaps with the
feature being played (requires TMDB genres in NFO)
- Age rating ceiling: exclude trailers rated higher than the feature
(requires TMDB certification in NFO)
- Avoid repeats: cycle through all trailers before replaying any;
resets per-user once the pool is exhausted
Genre and certification are fetched from TMDB at download time via a
single /movie/{id}?append_to_response=release_dates call and written
into the fake-movie NFO as <genre> and <mpaa> tags. All filters fall
back to the full unfiltered pool when no match is found.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
57 lines
3.2 KiB
C#
57 lines
3.2 KiB
C#
using MediaBrowser.Model.Plugins;
|
|
|
|
namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Configuration
|
|
{
|
|
public class PluginConfiguration : BasePluginConfiguration
|
|
{
|
|
// ── TMDB ──────────────────────────────────────────────────────────────
|
|
|
|
public string TmdbApiKey { get; set; } = string.Empty;
|
|
|
|
// ── Sources ───────────────────────────────────────────────────────────
|
|
|
|
public bool SourceNowPlaying { get; set; } = true;
|
|
public bool SourceUpcoming { get; set; } = true;
|
|
public bool SourcePopular { get; set; } = false;
|
|
public bool SourceTopRated { get; set; } = false;
|
|
|
|
// ── Date Range ────────────────────────────────────────────────────────
|
|
|
|
public int ReleaseDateRangeMonths { get; set; } = 6;
|
|
|
|
// ── Download Settings ─────────────────────────────────────────────────
|
|
|
|
public string DownloadFolder { get; set; } = string.Empty;
|
|
public int MaxTrailersToDownload { get; set; } = 20;
|
|
public int MaxPagesPerSource { get; set; } = 3;
|
|
public int PreferredVideoHeight { get; set; } = 720;
|
|
public bool SkipAlreadyDownloaded { get; set; } = true;
|
|
public bool SkipMoviesInLibrary { get; set; } = true;
|
|
public string YtDlpPath { get; set; } = string.Empty;
|
|
|
|
// ── Languages ─────────────────────────────────────────────────────────
|
|
|
|
/// <summary>Comma-separated ISO 639-1 codes. Empty = all languages allowed.</summary>
|
|
public string AllowedLanguages { get; set; } = string.Empty;
|
|
|
|
// ── Trailer Rotation ──────────────────────────────────────────────────
|
|
|
|
/// <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;
|
|
|
|
/// <summary>Only pick trailers whose genre overlaps with the movie being played.</summary>
|
|
public bool FilterByGenre { get; set; } = false;
|
|
|
|
/// <summary>Only pick trailers rated at most the same as the movie being played.</summary>
|
|
public bool FilterByRating { get; set; } = false;
|
|
|
|
/// <summary>Cycle through all trailers before repeating any.</summary>
|
|
public bool AvoidRepeats { get; set; } = true;
|
|
}
|
|
}
|