Commit Graph

17 Commits

Author SHA1 Message Date
Martin
1de082b96e feat: TMDB Discover source + retry yt-dlp once before fallback (v1.0.0.17)
All checks were successful
Publish Release / release (push) Successful in 14s
The fixed TV lists are mostly long-running shows whose first_air_date is
outside ReleaseDateRangeMonths, and paging stops at the first page with no
in-range title, so only ~7 TV candidates were found (5 then dropped by
language). Add a "discover" source per media type that asks /discover for
recent titles in AllowedLanguages, sorted by popularity (1600+ TV results
for en|fr today). TV Discover defaults on, movie Discover off.

yt-dlp failures were mostly passing HTTP 403s from back-to-back requests;
the built-in fallback is sometimes only offered 360p. Retry yt-dlp once
after 15s before falling back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:00:32 -04:00
Martin
d6280f3ce8 fix: built-in downloader prefers separate streams over 360p muxed (v1.0.0.16)
All checks were successful
Publish Release / release (push) Successful in 24s
When YouTube offered a muxed stream, it was always taken, but muxed streams
are 360p only. Use muxed only when the separate video+audio streams are
missing or not better.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 21:39:49 -04:00
Martin
fb75fa5a07 fix: language filter also checks the title's original language (v1.0.0.15)
All checks were successful
Publish Release / release (push) Successful in 9s
AllowedLanguages only filtered on each video's iso_639_1 tag, and TMDB
often tags subtitled foreign trailers as "en". With en,fr selected, 6 of
27 downloaded trailers were Korean, Chinese or Zulu titles. Candidates
now also need an allowed original_language (from the list results, so
no extra API calls).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:27:50 -04:00
Martin
86d8e2a05b fix: delete yt-dlp partial files when it fails (v1.0.0.14)
All checks were successful
Publish Release / release (push) Successful in 11s
yt-dlp removes its separate video/audio files after a successful merge, but
a failed run (e.g. HTTP 403 mid-download) left "<name>.f137.mp4.part" etc.
in the trailer folder, even when the built-in fallback then succeeded.
Always remove files sharing the output's "<name>." prefix after yt-dlp runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:19:24 -04:00
Martin
4145e1f1dd feat: yt-dlp prefers H.264, falls back to built-in, no pipe hang (v1.0.0.13)
Some checks failed
Publish Release / release (push) Failing after 8s
- Format string prefers avc1 video + m4a audio, then any codec. The RTX 2070
  host can hardware-transcode H.264 but not AV1.
- Pass Jellyfin's ffmpeg via --ffmpeg-location instead of relying on PATH.
- If yt-dlp fails, retry with the built-in YoutubeExplode downloader.
- Read stdout/stderr while yt-dlp runs (and add --no-progress); before,
  stdout was never read, so a full pipe buffer could block yt-dlp forever.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:01:33 -04:00
Martin
d850e12964 feat: restrict anime trailers, not all animation (v1.0.0.12)
All checks were successful
Publish Release / release (push) Successful in 9s
v1.0.0.11 kept every animated trailer away from non-animated content, which
also blocked Western animation (Pixar, Disney...). Only anime should be
restricted.

At download, a trailer is tagged ct4j-anime when TMDB has the "anime" or
"based on manga" keyword, or it is Animation in ja/zh/ko (keywords are now
appended to the details request). At playback, anime trailers are dropped
unless the feature is anime (genre "Anime", or those keywords as tags).
Western animation follows the normal genre/rating filters again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:57:12 -04:00
Martin
322d6cc65d feat: only play animated trailers before animated content (v1.0.0.11)
All checks were successful
Publish Release / release (push) Successful in 10s
An anime trailer could play before live-action content: the genre filter
accepts any single shared genre (anime is tagged Animation + Drama/Action/...),
and when nothing matched it fell back to the whole pool. Trailers tagged
Animation or Anime are now dropped for non-animated features before the
filters and the fallback run, so a live-action feature gets no trailer
rather than an animated one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:52:33 -04:00
Martin
5176582391 fix: download trailers as separate video+audio and merge with ffmpeg (v1.0.0.10)
All checks were successful
Publish Release / release (push) Successful in 26s
YouTube stopped serving muxed streams and YoutubeExplode 6.6.0 failed on
every video ("Video is not available"), so no trailer downloaded. Bump
YoutubeExplode to 6.6.2, download the best video-only + audio-only streams
and stream-copy them into one MP4 with ffmpeg. The separate files are
always deleted afterwards, merge or not.

Also delete the trailer folder when a download fails. Empty folders were
treated as "already downloaded" (never retried) and counted toward
MaxTotalTrailers, so over time they pushed out every real trailer. The
skip check now requires the trailer file itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:42:28 -04:00
Martin
6bb23dc9c4 feat: skip trailers/pre-rolls inaccessible to the current user (v1.0.0.9)
All checks were successful
Publish Release / release (push) Successful in 12s
Filters trailer pool items and pre-roll/feature pre-roll bumpers using
BaseItem.IsVisibleStandalone(user), so users without access to the
relevant library are never handed an item they can't actually play —
some Cinema Mode clients hang indefinitely in that case.
2026-06-10 13:07:11 -04:00
Martin
adfa570569 fix: pre-roll/feature pre-roll bumpers not found in library (v1.0.0.8)
All checks were successful
Publish Release / release (push) Successful in 8s
TopParentIds-based queries could fail to match Movie items in the
configured pre-roll library even when they appear correctly in the
Jellyfin UI. Look up the library Folder by ID and walk its recursive
children directly instead, matching the path-based approach already
used for the trailer pool.
2026-06-10 11:27:52 -04:00
Martin
c76ddbc352 chore: trace GetIntros calls and outcomes at Information level (v1.0.0.7)
All checks were successful
Publish Release / release (push) Successful in 10s
Logs every GetIntros call (item, path, enabled features), why an item
is skipped, and pre-roll/post-roll lookup outcomes, without depending
on a Debug logging.json override.
2026-06-10 11:09:48 -04:00
Martin
ba56926dc2 chore: add diagnostic logging for pre-roll bumpers (v1.0.0.6)
All checks were successful
Publish Release / release (push) Successful in 13s
Helps diagnose why a Trailer Pre-Roll/Feature Pre-Roll bumper isn't
playing by logging invalid library IDs, empty library results, and
the movie picked.
2026-06-10 10:35:33 -04:00
Martin
a0bddac48d feat: add Trailer Pre-Roll and Feature Pre-Roll bumpers
All checks were successful
Publish Release / release (push) Successful in 14s
Adds two optional IIntroProvider bumper slots, mirroring CherryFloors'
cinema mode plugin: a "Trailer Pre-Roll" played before the trailer block
and a "Feature Pre-Roll" played right before the movie/episode. Each is
configured by picking an existing Jellyfin Movie library, from which a
random Movie is injected as the bumper.

Bump version to 1.0.0.5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 01:13:52 -04:00
Martin
f49c32f181 feat: add TV show trailer downloads, episode trailers, and movie/TV trailer separation
All checks were successful
Publish Release / release (push) Successful in 23s
- Download trailers for TV shows from TMDB with separate sources and an
  independent max-count cap (0 disables a category)
- Play trailers before TV episodes via IIntroProvider, limited to the first
  episode a user watches each day
- Tag TV show trailers in their NFO so movies only get movie trailers and
  episodes only get TV show trailers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 00:41:37 -04:00
Martin
83966f40ea feat: add genre, rating, and avoid-repeats trailer filters
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>
2026-06-09 17:15:38 -04:00
Martin
e84a897c27 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>
2026-06-09 13:03:34 -04:00
Martin
c2d2b1ae44 Initial commit: CinemaTrailers4Jellyfins plugin
Some checks failed
Publish Release / release (push) Failing after 17s
Adapted from Trailers4Jellyfin: keeps TMDB/YouTube trailer downloading,
the scheduled task, language/source/date filters, and trailer rotation,
but drops cinema-mode/IIntroProvider entirely. Each trailer now ships in
its own fake-movie folder (placeholder video + locked NFO + trailer) for
use with a Cinema Mode / trailer pre-roll plugin.
2026-06-08 14:24:28 -04:00