Will 4.9.5 API Classes Have Support for TV Show Trailers?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Will 4.9.5 API Classes Have Support for TV Show Trailers?

Post by HarryMuscle »

Just wondering if the API classes coming in 4.9.5 will have support for TV series trailers? In other words, will there be a getTrailers method in the SeriesInfo class. If not currently in the beta, could it be added?

Thanks,
Harry
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Will 4.9.5 API Classes Have Support for TV Show Trailers?

Post by rednoah »

Not planned. We have internal API for movies I think... but it's unused because nobody has a use case that isn't already covered better built-in with Kodi / Plex / etc. It's disabled in the htpc nfo template to due to nfo compatibility issues.

The YouTube and Vimeo links we could maybe conjure up, with additional API requests, unlike image URLs, would be useless because we wouldn't be able to just download video files.


EDIT:

:!: TheTVDB API v2 / v4 also doesn't seem to support tv series trailers at this point in time.


:arrow: Maybe in the future if multiple users independently bring up this use case. The natural next feature request "download trailers" will however be forever out-of-scope until some database starts offering video file download links (which is very unlikely due to copyright and hosting costs).



EDIT 2:

FileBot r9094 removes the trailers property from the MovieInfo class because it's not used internally. At the same time, extension methods Movie.getExtras() and SeriesInfo.getExtras() are added to access TheMovieDB /videos records, including trailers, on demand. Though you only get YouTube ID, so not much you can do with that, maybe generate some *.url files, not planning on adding anything like that to the official script repository though.



EDIT 3:

FileBot r9094 would then allow you to find YouTube IDs for trailers, which you could then pass on to a 3rd party tool:

Code: Select all

$ filebot -find /input --filter f.video -exec echo youtube-dl -o trailer.mp4 "{ episode.seriesInfo.extras.find{ it.type == /Trailer/ && it.site == /YouTube/ }.key }"
Buffy the Vampire Slayer/Season 1/Buffy the Vampire Slayer - 1x01 - Welcome to the Hellmouth.mp4
youtube-dl -o trailer.mp4 -1v_q6TWAL4
:idea: Use echo for testing. Remove echo to call youtube-dl.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Re: Will 4.9.5 API Classes Have Support for TV Show Trailers?

Post by HarryMuscle »

Awesome. Thanks for all the details.

Thanks,
Harry
Post Reply