Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
322d6cc65d | ||
|
|
c208a81b75 |
@@ -3,8 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>Jellyfin.Plugin.CinemaTrailers4Jellyfins</RootNamespace>
|
||||
<AssemblyVersion>1.0.0.10</AssemblyVersion>
|
||||
<FileVersion>1.0.0.10</FileVersion>
|
||||
<AssemblyVersion>1.0.0.11</AssemblyVersion>
|
||||
<FileVersion>1.0.0.11</FileVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
|
||||
@@ -147,9 +147,16 @@ namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
// Apply enabled filters. If nothing survives, fall back to the full pool.
|
||||
var filtered = ApplyFilters(pairs, feature, config);
|
||||
var pool = filtered.Count > 0 ? filtered : pairs;
|
||||
// Animation is a style, not a topic: animated trailers (anime included) only play
|
||||
// before animated content. Applied before the fallback below, so a live-action
|
||||
// feature never gets one — it gets no trailer instead.
|
||||
var eligible = IsAnimated(feature)
|
||||
? pairs
|
||||
: pairs.Where(p => !IsAnimated(p.Movie)).ToList();
|
||||
|
||||
// Apply enabled filters. If nothing survives, fall back to the eligible pool.
|
||||
var filtered = ApplyFilters(eligible, feature, config);
|
||||
var pool = filtered.Count > 0 ? filtered : eligible;
|
||||
|
||||
// Prefer unseen trailers within the pool; reset the cycle when all have been shown.
|
||||
pool = ApplyAvoidRepeats(pool, user.Id, config.AvoidRepeats);
|
||||
@@ -229,6 +236,12 @@ namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services
|
||||
return new IntroInfo { ItemId = movie.Id, Path = movie.Path };
|
||||
}
|
||||
|
||||
// TMDB tags anime as "Animation"; anime metadata providers (e.g. AniDB) use "Anime".
|
||||
private static readonly string[] AnimatedGenres = { "Animation", "Anime" };
|
||||
|
||||
private static bool IsAnimated(BaseItem item)
|
||||
=> item.Genres.Any(g => AnimatedGenres.Contains(g, StringComparer.OrdinalIgnoreCase));
|
||||
|
||||
private static List<(Movie Movie, BaseItem Trailer)> ApplyFilters(
|
||||
List<(Movie Movie, BaseItem Trailer)> pairs,
|
||||
BaseItem feature,
|
||||
|
||||
14
build.yaml
14
build.yaml
@@ -1,5 +1,5 @@
|
||||
---
|
||||
version: 1.0.0.10
|
||||
version: 1.0.0.11
|
||||
name: CinemaTrailers4Jellyfins
|
||||
guid: b581493e-1046-40ed-b6dc-cb8027624984
|
||||
description: >
|
||||
@@ -12,13 +12,11 @@ category: General
|
||||
owner: 514mart
|
||||
targetAbi: 10.11.0.0
|
||||
changelog:
|
||||
- Fix trailer downloads, broken by a YouTube change. YouTube no longer
|
||||
serves combined video+audio files, so the built-in downloader now fetches
|
||||
the video and audio separately, merges them with ffmpeg (no re-encode)
|
||||
and deletes the separate files afterwards
|
||||
- A failed download no longer leaves an empty trailer folder behind.
|
||||
Empty folders counted toward "Max trailers to keep" (pushing out real
|
||||
trailers) and were never retried
|
||||
- Animated trailers (anime included) now only play before animated
|
||||
content. Before, an anime trailer could play before a live-action
|
||||
movie or show when they shared a genre like Drama or Action, or when
|
||||
no trailer matched the genre filter. A live-action feature now gets no
|
||||
trailer rather than an animated one
|
||||
|
||||
dotnetProjects:
|
||||
- name: Jellyfin.Plugin.CinemaTrailers4Jellyfins
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
"owner": "514mart",
|
||||
"imageUrl": "https://www.git.quarantinedstudio.com/mvezina/CinemaTrailers4Jellyfins/raw/branch/main/Jellyfin.Plugin.CinemaTrailers4Jellyfins/Images/logo.svg",
|
||||
"versions": [
|
||||
{
|
||||
"checksum": "13e6467ce568b1abe987ef5a8a0ee95d",
|
||||
"changelog": "- Fix trailer downloads, broken by a YouTube change. YouTube no longer serves combined video+audio files, so the built-in downloader now fetches the video and audio separately, merges them with ffmpeg (no re-encode) and deletes the separate files afterwards\n- A failed download no longer leaves an empty trailer folder behind. Empty folders counted toward \"Max trailers to keep\" (pushing out real trailers) and were never retried\n",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://www.git.quarantinedstudio.com/mvezina/CinemaTrailers4Jellyfins/releases/download/v1.0.0.10/cinematrailers4jellyfins_1.0.0.10.zip",
|
||||
"timestamp": "2026-10-05T21:42:55Z",
|
||||
"version": "1.0.0.10"
|
||||
},
|
||||
{
|
||||
"checksum": "9594d14a5fed94ee5eea55d72c71728c",
|
||||
"changelog": "- Skip trailers and pre-roll/feature pre-roll bumpers the current user can't actually access (e.g. a library not in their library access list) \u2014 some Cinema Mode clients hang indefinitely trying to play an inaccessible item, so these are now filtered out per-user instead\n",
|
||||
|
||||
Reference in New Issue
Block a user