Skip to content

Add trailer download functionality with TMDb and YouTube integration - #36

Open
knom wants to merge 3 commits into
CherryFloors:mainfrom
knom:trailerdownload
Open

Add trailer download functionality with TMDb and YouTube integration#36
knom wants to merge 3 commits into
CherryFloors:mainfrom
knom:trailerdownload

Conversation

@knom

@knom knom commented Jul 16, 2025

Copy link
Copy Markdown

A new scheduled task to download trailers from youtube to the local machine:

  • Get library items with TMDb ID
  • Lookup TMDb item in the online TMDb API and get trailer video links
  • Download associated Youtube trailer video links into the local library

Whats new:

  • Added scheduled task for automatic trailer downloads.
  • Implemented trailer downloading logic in a new TrailerDownloader class.
  • Added necessary dependencies for TMDb and YouTube downloading.
  • Introduced new configuration options for TMDb API key and trailer download libraries.
  • Updated HTML configuration to support new features.

@knom

knom commented Jul 16, 2025

Copy link
Copy Markdown
Author

Only HOOK is, PYTHON3 must be installed in the container image / machine.
So that the youtube download works.

@knom

knom commented Jul 16, 2025

Copy link
Copy Markdown
Author

@CherryFloors please take a look and let me know what you think!
I think this would be a great addition :-)

@knom

knom commented Jul 16, 2025

Copy link
Copy Markdown
Author

BTW.. for library selection I have followed the pattern of #32.
And made it generic - so it could be used both there as well as here.

@knom
knom force-pushed the trailerdownload branch from fc601b1 to b34485b Compare July 17, 2025 13:09
- Implemented trailer downloading logic in a new TrailerDownloader class.
- Added scheduled task for automatic trailer downloads.
- Added necessary dependencies for TMDb and YouTube downloading.
- Introduced new configuration options for TMDb API key and trailer download libraries.
- Updated HTML configuration to support new features.
- Updated README
@knom
knom force-pushed the trailerdownload branch from b34485b to 69e9b07 Compare July 17, 2025 13:46
@CherryFloors

Copy link
Copy Markdown
Owner

Hi @knom ,

Sorry for not replying to this PR sooner. You have done alot of work here and I think this functionality would be extremely useful/desirable for certain users and I had suspected I would get something like this in the form of a feature request.

Unfortunately I feel strongly that this plugin should be very limited in scope and only provide a list of intros based on media that already exists in the server. I don't want it to also be responsible for gathering or curating media, whether its trailers or pre-rolls. Partially due to the increased modularity that provides when installing plugins but also due to my limitation in bandwidth for supporting features like those.

As I said before, I do think people would enjoy a plugin like this and I encourage you to use what you have done here to create one. Maybe call it "Trailer Downloader" or "Pre Roll Content Curator" and expand to downloading pre roll content as well. Take whatever you need from this repo to get it started. I will happily take a PR edit to the README that provides a link to your project when you have it up and running.

public int NumberOfTrailers { get; set; }
public bool TrailerConsumeMode { get; set; }

public string TmdbApiKey { get; set; }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Something to consider if you implement this in your own plugin is that jellyfin actually stores trailer URLs from TMDB or other metadata providers in the media meta data. This is how it plays trailers from youtube when you dont have local trailers with your media.

You should just be able to query the jellyfin server for the youtube urls without needing to reach out to TMDB with an API key. Could simplify things for you and your users.

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