I initially bought a Plex Pass because I wanted to have Trailers for my movies and TV Shows.
For a minority of titles, Plex doesn't seem to have trailers however. Especially lesser known and foreign titles.
This script will fill those gaps.
- 🔍 Detects Missing Trailers: Scans your Plex libraries for items that lack trailers. (either Plex Pass or local)
- ▼ Filters out specified Genres: You may not want trailers for concerts or 3 minute shorts..
- 🎥 Automatic Downloading: Uses YT-DLP to fetch the best available trailer from Youtube.
- 📂 Organized Storage: Trailers are saved according to Plex guidelines for both Movies and TV Shows.
- 🔄 Refreshes Metadata: Refreshes metadata of items with new trailer. (Necessary for Plex to 'detect' them)
- 🖥️ webUI: Change settings, keep track and trigger manual downloads
MTDP is designed to run headless on schedule so it keeps your library updated with trailers.
However you can also access the webUI on http://localhost:2121/
On the Dashboard you'll find general statistics, an overview of the latest downloaded trailers, and a yt-dlp updater.
You can edit your config in the Settings page and check the Log.
The Movies and TV Shows pages allow you to apply filters for missing trailers. Local trailers can be filtered by resolution.
Open a detail page to see the current available trailer or trigger a manual search.
example.webm
- Download Docker Desktop from docker.com
- Install and start Docker Desktop on your computer
- Verify installation: Open a terminal/command prompt and type
docker --version- you should see a version number
- Create a new folder for MTDP on your computer (e.g.,
C:\MTDPor/home/user/MTDP) - Create a new file called
docker-compose.ymlin that folder - Copy and paste this content into the file:
version: '3.8'
services:
mtdp:
image: netplexflix/mtdp:latest
container_name: mtdp
environment:
- PUID=1000 # Change to your user ID
- PGID=1000 # Change to your group ID
- TZ=America/New_York # Change to your timezone
- SCHEDULE_HOURS=24 # Run every X hours (default: 24)
# - CRON=0 2 * * * # Optional: cron schedule (overrides SCHEDULE_HOURS)
ports:
- "2121:2121" # Web UI
volumes:
- ./config:/config # Mount your config directory
- ./logs:/app/Logs # Optional: persist logs
- ./cookies:/cookies # Optional: location of your cookie file
- /path/to/media:/media # Mount your media directory (same as Plex sees it)
restart: unless-stopped- Update the timezone in the
TZenvironment variable to match your location (e.g.:America/New_York,Europe/London,Asia/Tokyo) - Update PUID/PGID to match your system user (optional - defaults to 1000:1000)
- Optional: Use a CRON schedule instead of
SCHEDULE_HOURSfor more precise timing. Uncomment theCRONline and set a cron expression (e.g.,0 2 * * *for daily at 2am). WhenCRONis set, it overridesSCHEDULE_HOURS. Uses standard 5-field cron syntax:minute hour day month weekday.
- You must update the media paths in the existing
docker-compose.ymlfile. - The media path in the container (/media) must match how Plex sees the files
- Example: On thehost system your Movies are at /mnt/storage/movies Plex sees them at: /media/movies The mount:
volumes:
- /mnt/storage:/media
Important
If Plex returns Windows volumes, e.g. P:\movies then remove the colon and use forward slash.
example: - P:\Movies:/P/Movies
- Create a
configdirectory - Download
config.example.yml, rename it toconfig.ymland save it in your config folder - Configure your settings. See ⚙️ Configuration
- Open a terminal/command prompt in your MTDP folder
- Type this command and press Enter:
docker-compose pull
- Type this command and press Enter:
docker-compose up -d
Missing Trailer Downloader for Plex is available on the Unraid Community Apps store as MTDP.
Click install and apply the default template.

Edit the config.yml file to set your Plex details and desired variables:
| Setting | Value | Description |
|---|---|---|
LAUNCH_METHOD |
'0', '1', '2', '3' |
0 = Choose at runtime, 1 = Movies only, 2 = TV Shows only, 3 = Both consecutively |
PLEX_URL |
'http://localhost:32400' |
URL of your Plex server (change if needed) |
PLEX_TOKEN |
'YOUR_PLEX_TOKEN' |
Authentication token for Plex API access (How to find your Plex Token) |
USE_LABELS |
true, false |
Whether to use MTDfP labels to track processed items |
| Setting | Value | Description |
|---|---|---|
CHECK_PLEX_PASS_TRAILERS |
true, false |
Check for existing Plex Pass trailers before downloading (default: true) |
DOWNLOAD_TRAILERS |
true, false |
Whether to actually download missing trailers (false will only list them) |
PREFERRED_LANGUAGE |
'original', 'english', 'german', 'french', etc. |
Language preference for trailer downloads (default: 'original'). You can also use multiple terms like 'german deutsch' |
REFRESH_METADATA |
true, false |
Refresh Plex metadata after downloading trailers |
| Setting | Value | Description |
|---|---|---|
SHOW_YT_DLP_PROGRESS |
true, false |
Show detailed yt-dlp download progress (useful for debugging) |
YT_DLP_CUSTOM_OPTIONS |
"your custom command" |
Any custom options/commands you'd like to pass to yt-dlp |
TRAILER_FILE_FORMAT |
mkv, mp4 |
File format you want your trailers to use |
TRAILER_RESOLUTION_MAX |
360, 480, 720, 1080, 1440, 2160 |
Highest resolution to attempt downloading |
TRAILER_RESOLUTION_MIN |
360, 480, 720, 1080, 1440, 2160 |
Lowest acceptable resolution — won't download below this |
The script supports multiple libraries for both Movies and TV Shows. You can configure multiple libraries with individual genre skip lists.
# TV Libraries Configuration
# Configure multiple TV show libraries with individual genre skip lists
# Each library can have different genres_to_skip settings
TV_LIBRARIES:
- name: 'TV Shows'
genres_to_skip:
- 'Talk Show'
- 'Stand-Up'
- 'News'
- name: 'Anime TV'
genres_to_skip:
- 'Talk Show'
- 'Stand-Up'
- 'News'
- 'Reality'
- name: 'Documentaries'
genres_to_skip:
- 'Talk Show'
- 'Stand-Up'
# Movie Libraries Configuration
# Configure multiple movie libraries with individual genre skip lists
# Each library can have different genres_to_skip settings
MOVIE_LIBRARIES:
- name: 'Movies'
genres_to_skip:
- 'Short'
- 'Stand-Up'
- 'Concert'
- name: 'Anime Movies'
genres_to_skip:
- 'Short'
- 'Stand-Up'
- 'Concert'
- name: 'Documentaries'
genres_to_skip:
- 'Short'
- 'Stand-Up'# TV Libraries Configuration
# Configure multiple TV show libraries
# Each library will process all genres (no filtering)
TV_LIBRARIES:
- name: 'TV Shows'
- name: 'Kids TV Shows'
# Movie Libraries Configuration
# Configure multiple movie libraries
# Each library will process all genres (no filtering)
MOVIE_LIBRARIES:
- name: 'Movies'
- name: 'Kids Movies'In case you need to use your browser's cookies, you can pass them along to yt-dlp.
To extract your cookies in Netscape format, you can use an extension:
Add the path to the folder containing your cookies.txt to your docker-compose.yml under volumes::
- /path/to/cookies:/cookies- Create a
cookiesfolder in the same directory as the MTDP script - Export your browser cookies to
cookies.txtwithin this new subfolder
Open a Terminal in your script directory and launch the script with:
python MTDfP.pyYou’ll be prompted to choose:
- 1: Run Movie library.
- 2: Run TV shows library.
- 3: Scan both consecutively.
Alternatively, pre-set your preferred method in config.yml (LAUNCH_METHOD field) to bypass selection.
Tip
Windows users can create a batch file to quickly launch the script.
Type "[path to your python.exe]" "[path to the script]" -r pause" into a text editor
For example:
"C:\Users\User1\AppData\Local\Programs\Python\Python311\python.exe" "P:\Scripts\Missing Trailer Downloader for Plex\MTDfP.py" -r
pause
Save as a .bat file. You can now double click this batch file to directly launch the script.
You can also use this batch file to schedule the script to run daily/weekly/etc.
| Main Differences: | Trailarr | MTDP |
|---|---|---|
| Requires Radarr and Sonarr | ✅ | ❌ |
| Emby/Jellyfin support | ✅ | ❌ |
| Plex Support | ✅ | ✅ |
| Automatically refreshes Plex metadata (required for Plex to detect the trailers) | ❌ | ✅ |
| Can skip download if trailer is already available via Plex Pass | ❌ | ✅ |
If you like this project, please ⭐ star the repository and share it with the community!

