I created bash script to download missing trailers for Plex. It goes through all your movies and matchs them up with an entry in plex, gets the movie name and search for the trailer on youtube, then passes that to youtube-dl to download the trailer, if download fails, it trys the next one.
If you are plex pass owner, this script will download only missing trailers, but if you want, it can download trailers for every movie.
missing_trailers.sh
missing_trailers.cfg.example
mpath - folder to your media movies library
pms - Plex Media Server data directory: https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/
ytapi - YouTube API: https://developers.google.com/youtube/v3
extras - If you have PlexPass and want to download only missing trailers, leave 0, if you want to download trailer for every movie, change to 1
must have ‘sqlite’, ‘youtube-dl’ and ‘bash’ packages installed.