Hi, in this tutorial, we will see how to:
1) Automatically download trailer and save them in each local folder (only if you have used in Plex the agent "The Movie Database").
2) automatically save poster of movies, inside local folder of each one.
3) automatically create ico to view poster instead default folder ico in explorer.
Software required:
Windows 10, Plex with ExportTools plugin installed , Excel (for section section 1 - section 2 - section 3)
Youtube-DLG (for section 1)
Photoshop, IcoFx (for section 3)
As Plex suggests, your Movie files must be named and organized in different folders in this way:
Movies
Title01
Title01 (date).mkv
Title01 (date).jpg <-- you will be able to save the poster with section 2
Title01 (date)-trailer.mp4 <-- you will be able to save trailer with section 1
Title01 (date).ico <-- you will be able to save ico with section 3
Title02
Title02 (date).mkv
Title02 (date).jpg <-- you will be able to save the poster with section 2
Title02 (date)-trailer.mp4 <-- you will be able to save trailer with section 1
Title02 (date).ico <-- you will be able to save ico with section 3
N.b. If you don't have organized movies like that, this tutorial doesn't work. Also consider that this tutorial works only with your movies library collection in Plex (not playlist).
Before start, we'll go to configure ExportTools.
Inside Plex, go to plugin, on ExportTools plugin, click on settings button and configure all parameters like that:

"Path to export media to" is the folder where plugin writes the database and the posters (if the folder doesn't exist, you have to create before clicking save).
Now, click save, then launch the plugin, selecting your movies folder. Now let's take a look at folder
c:\tempexport
Inside, there is a folder called ExportTools, inside it there are a file *.xlsx (with the database) and a posters folder with the images.
Open Excel and verify that the column are named with letter (A, B, C, ...) otherwise change Excel settings.
Now it's time to download my excel file, with the program. On opening, remember to enable the macros, otherwise it doesn't run correctly (you can download it here).
Link to download program in Excel
On opening, it asks to locate the database previously exported. Do it. Then a popup ask you to write the temp poster path (in this example, write: c:\tempexport\ExportTools\posters); then another popup ask you to write the temp trailer path, where we'll download the trailers (for example write: c:\trailers). If this folder doesn't exist, create it.
Now there are two possibilities:
1) "Ok, there are not errors!" means that all movies in Plex have link to TheMovieDB site.
Click OK button.
2) "Attention! There are missing links to...."
Read the explanation popup, then click OK button and at the beginning of AQ column you'll find the movies with missing links, red colored. Note that these links are only important if you want to download local trailers, otherwise you can ignore it. Instead if you want local trailers, you must to return in Plex, re-associate those movies with "The Movies database" agent, and repeat the steps done before with ExportTools. Now reopening my program and, when it asks, the new xlsx; now you should not have the error again.
Good, now you have all your rows with movies on the left and buttons with macro on the right. (To navigate inside movies rows, you must use only the left windows, not the windows with the button).
If you want to use all the feauteres of the program read all next paragraphs, otherwise jump to the section desired.
01 TRAILERS
Click on BUTTON 2, the program begins to search the id of the youtube trailers, found in the links of AQ column. Please keep in mind that if you have a lot of movies, Excel will take some time (it will seem to you that Excel is blocked, but instead it runs, don't worry, and wait until the end of the process).
Now on DW column there are the new ID of the trailers (if some rows are empty, it means that there aren't on the website themoviedb.org)
Now it's time to open Youtube-DLG
Set the download folder to the temp download folder decided before, in this ex. c:\trailers
In option, general, set "Filename format" to ID.
Now come back to Excel, click on BUTTON 9 to copy the column AQ to clipboard, then come back to Youtube-DLG, and paste in the window "Enter URLs below" with CTRL+V, click ADD and then the button at bottom right to start downloading trailers. Wait until the end.
To see trailers in Plex, they must have *.mp4 extension, so in Excel click BUTTON 4 (it'll change all extension of the trailers downloaded to *.mp4).
Ok, now it's time to rename trailers as Plex wants. So click BUTTON 3, it'll copy EE column and it'll open the folder c:\trailers in explorer. Click File, Open Windows PowerShell as Administrator .
In this window, paste with CTRL+V, then enter and wait until c:\trailers appears at last row. You have to consider that with many files to rename, it'll takes tame... Wait, the PC is not blocked. If there are missing trailers, you'll see some lines in red telling you impossible to rename, but it's not a problem, because that trailers don't exist, so PowerShell simply tell you that it's not able to rename a file that doesn't exist.
Ok, at the end, close the window, and take a look inside c:\trailers
All files have been renamed as we want.
Now it's time to copy these trailers in the different final folders of the movies. To do that, simply come back to Excel and click BUTTON 5. Now as before, it'll copy EF column and it'll open the folder c:\trailers in explorer. Open Windows PowerShell as Administrator, CTRL+V, then Enter, wait until the end. Close it.
Take a look inside your movie folder (the same from which we started from Plex), you'll find your trailers in each movie folder!
Now you can delete c:\trailers, because you don't need anymore.
02 POSTERS
Click on BUTTON 6 to copy the column DZ to clipboard and to automatically open the folder C:\tempexport\ExportTools\posters. Click File, Open Windows PowerShell as Administrator and CTRL + V, then enter to rename posters.
Click on BUTTON 7 to copy the column EB to clipboard and to automatically open the folder C:\tempexport\ExportTools\posters. Click File, Open Windows PowerShell as Administrator and CTRL + V, then enter to copy posters in each movie folders.
Take a look inside your movie folder (the same from which we started from Plex), you'll find your trailers (if you did section 01) and posters in each movie folder!
03 ICON
What we'll do in this section? We want an icon preview of each movies inside explorer, instead of the standard ugly yellow folder.
We use Photoshop to create *tif files from the *.jpg inside folder: c:\tempexport\ExportTools\posters (posters inside were previously renamed with section 2). These *.tif files have the same name of *.jpg files but have 256px x 256px dimensions with a transparent background.
To speed up the creation of these *.tif files, I've created a droplet with photoshop. (you can download here).
Link to download Photoshop droplet
Drag folder (not singles jpg) c:\tempexport\ExportTools\posters into droplet.exe
At the end of the batch process, the *.tif files will be saved in c:\tempexport\ExportTools\posters. Pay attention, my droplet saves always *.tif in c:\tempexport\ExportTools\posters. So if at the beginning of this tutorial you have choose a different path to ExportTools, you must:
- recreate your personal droplet as you wish
or
- manually move the *.tif from c:\tempexport\ExportTools\posters to your path.
Now open IcoFx and click on Tools, Batch create Icons or Cursors, Add...
Select your tiff files created with Photoshop.
In Image formats, select only 256x256 - 32
In Output Folder, select c:\tempexport\ExportTools\posters
In File Format, windows icon.
OK.
Now we come back in my Excel program, and click on BUTTON 8. What does it do?
Two things:
1) for each movie folder, it creates a hidden system file, named desktop.ini with some strings to tell to Windows:
"for this folder, set the ico contained inside the folder".
2) it copy the column ED to clipboard and automatically opens the folder c:\tempexport\ExportTools\posters. Then you have to Click File, Open Windows PowerShell as Administrator and CTRL + V, then enter to copy ico in each movie folders.
Take a look inside your movie folder (the same from which we started from Plex), you'll find your trailers (if you did section 1) the posters (if you did section 2) and now the ico in each movie folder!
And if in explorer you set the visualization of hidden system files, you will see also desktop.ini
So to recap: if you did section 1, section 2 and section 3 of this tutorial, you should have in each movie folder:
- example (year).mkv
- example (year).jpg
- example (year)-trailer.mp4
- example (year).ico
- desktop.ini
Now there is a last thing to do. Windows need set folders to "read only" to be able to read desktop.ini files.
To do that, I wrote a registry key
Link to download Registry readable key
Double click on it, and it'll install.
Now if you select some movie folders in explorer, right click, and in the context menu it appears the option "Set folder read-only". Do it and... Now you can see the preview poster in explorer!
N.b. If you want to select more than 15 folders, the context menu disappears. To solve this issue
-
Open Registry Editor, in Windows with start, regedit.
-
Go to the following Registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer -
Create a 32-bit DWORD value named MultipleInvokePromptMinimum.
-
Double click on it and put a value numbers in decimals of the maximum folders you want to be able to process (ex. 300)
Now you are able to set 300 folders readable, in one click!
If you want to reset a folder to writable, in the same way above download and add this registry key:
USING this program from the second time
I hope that you feel good with this program in Excel. We hypothesize that you used it in the past and arranged your movies folders. But in time, you added some new movies to your collection in Plex. Unfortunately, you cannot configure ExportTools plugin to export only some movies desired. So you have to re-export the entire collection.
When you'll open it with my program, I designed it to help about this issue. The rows with movies are ordered in data added (see column AG), so in the row 3 you have the last movie added to Plex.
Now to remove movies just done in the past, click on BUTTON 01, confirm YES, and then insert the number of the last movie you did. Excel will clear row from that number to the end. Now you'll able to begin to work with the program.
CONCLUSIONS
I apologize for my poor English language skills, it's not my first language. I think that this program, once you understand how it works, can help you and save your time, especially when you have a lot of movies to process.
I had fun programming it in my free time, although it had not been a quick thing.
Naturally, you can use and share as you want, but if you found it useful, you may wish to consider to offer me a pizza!!!

