These changes were confounding, because I followed Plex's instructions for naming and organizing movie files, but the Plex Media Server was clearly ignoring my effort and replacing my tidy titles with... something else. In most cases, Plex's renaming behavior didn't just cause the titles to look ugly- it also interfered with Plex's ability to download relevant data for most of the films, particularly the movie poster box art.
In the below screenshot you can see that plex only identified one of my movie files correctly, while it renamed all of the others with the unexpected title names, and used generic thumbnails instead of downloading the movie posters.
Well it took me several days of research and experimentation (and scouring the Plex forums where some users' independent discoveries helped light the way), but I finally both figured out what was going on and came up with a way to fix it.
ROOT CAUSE
Plex uses a variety of different media detection and matching methods in order to correctly identify titles and download the appropriate metadata (plot summary, box art, etc.). In my case, Plex was doing two different things that were causing my correctly-named files to be renamed once they were processed in the Plex database: First, Plex was ignoring file and folder names in cases where it looked into an individual file's metadata and found a "Title" property in the metadata. Also, the agents Plex uses to identify movies were running in the wrong order for my library settings, so Plex wasn't performing the expected lookup operations in cases where it found the "Title" property in a file.SOLUTION
I've come up with a workflow that guarantees that when Plex detects your media files it uses online information first, before attempting to look inside your files' metadata for an alternative title. There are three different aspects to this: Your Plex server settings, your Plex library settings, and your individual files- so I will address each of them separately.Note: I encountered this problem (and fixed it) using Plex Media Server both on my Synology DS214se NAS and on a computer running Windows 7. My NAS has version 1.5.3 of Plex installed and my PC has a slightly newer version, 1.5.6. My steps work the same for both versions/platforms.
Plex Server Settings
You only have to make this change once per Plex server in your home. Ideally you should do this before creating any new Plex libraries, so that your libraries get scanned correctly the first time.- Log in to your Plex server and click the Home icon to go to the Plex server's home page.
- Click the Settings icon in the top-right of the page and then click Server to view the Server settings.
Note: If you get a "server settings are unavailable" message, it sometimes helps to sign out from your Plex account (the icon in the upper-right corner of the page) and then sign back in and try again.
- Once you're on the Server tab of the Settings page, click Agents and then click Movies.
- Below Movies, click Plex Movie. The sub-agents that the "Plex Movie" agent uses when matching media are listed below in order of precedence. The "Local Media Assets (Movies)" sub agent is the one that looks inside your files for the Title metadata tag. Select Local Meda Assets and drag it to the bottom of this list! Also, make sure that Plex Movie is at the top. The "Plex Movie" option cannot be unchecked, but you can optionally check/uncheck the other options in this list. Remember, Plex will use these agents in the order that they appear here.
Correct sub-agent order for Plex Movie agent. - Next, under Movies, select The Movie Database and make the same kind of adjustments: Drag Local Media Assets (Movies) to the bottom of the list and make sure The Movie Database is on the top. You can check/uncheck other sub-agent options if you wish.
Correct sub-agent order for The Movie Database agent. - Click the Home icon to return to the main Plex screen. Under Libraries on the left side of the page, click the ... icon next to your Movies library, then click Refresh All > Refresh. This rebuilds your library using your new server settings. Already you can see a huge improvement in my own library. Note that two titles still have mangled names- that's because neither of these films exists in the Plex Movie database, so Plex fell back on the Local Media Assets agent to extract their metadata. We'll tackle this problem in the "Preparing Your Files" section below.
My library after changing the sub-agent order and performing a "Refresh All."
Plex Library Settings
In order for the Plex server settings we changed to have any effect we need to make sure our libraries have the correct agent settings for the desired media type. In the case of movie files, this means you should select either Plex Movie or The Movie Database.Editing an existing library
- On the left side of the Plex server home page, click the ... next to your Movies library under Libraries, and then click Edit.
- On the Edit Library screen, click Advanced and then scroll down to where you can see the Scanner and Agent settings.
- For Scanner, select Plex Movie Scanner.
- For Agent, select either Plex Movie or The Movie Database. Each agent has some other customization options that appear below.
- When you have chosen your desired settings, click Save Changes.
- Back on the Plex server home page, under Libraries on the left side of the page, click the ... icon next to your Movies library, then click Refresh All > Refresh.
Creating a new library
- On the Plex server home page, click the + next to Libraries.
- On the Select type tab, click Movies and optionally name your library.
- On the Add folders tab, click Browse For Media Folder to locate and add folders that Plex will search when updating this library. You can add multiple folders to a single library.
- On the Advanced tab, scroll down until you can see the Scanner and Agent settings.
- For Scanner, select Plex Movie Scanner.
- For Agent, select either Plex Movie or The Movie Database, and check any of the additional options that appear below.
- Click Add Library to complete the process and begin scanning for media.
Preparing Your Files
- Before you even try to add any movie files to Plex, you should make sure you are following the recommended folder and file naming scheme. Plex's instructions are pretty clear, but it basically boils down to: Put each movie into its own folder, and name the folders and movie files in this format: "Movie Title (year).ext" (Where "ext" is the filename extension of the movie (mkv, mp4, m4v, etc.).
Here you can see that each of my movie files is stored in its own folder, with both the folder and movie file following the same naming convention. - Even after fixing my Plex server settings, some of my files were still getting renamed unexpectedly, and this was because the media files contained metadata tags that had those undesired names in the Title property. Notice the following:
The title on the left (listed as DLT16013) is for a file in my library named "Inspector Morse - Cherubim and Seraphim (1992).m4v". If I locate that file in Windows File Explorer, right-click the file, and go to Properties > Details, this is what I see:
The source of the problem. - If you had to remove metadata in order to fix a problem in an existing library you might have to do a "Refresh All" on the library to force Plex to re-inspect your modified files. I chose to make new copies of my problem files and uploaded them with different filenames (with the "- Copy" still there), and as a result I only had to do a "Update Library" in order to fix the handful of problem entries rather than rebuilding the whole database.
Yes! |
7 comments:
Thank you soooo much for this! Man, do you happen to need to organize anything else? Your a genius at writing an easy to follow, step-by-step guide.
Thanks again...
You absolutely nailed the fix for this naming issue Plex had for me. Thank you 1
Beautifully rendered post... Thank-you...
Thank you this solved my problem. Well documented
Thank you!!! You are our true HERO! This worked perfectly - especially creating another copy via "windows" side of the house, with "all possible file detail properties" removed! After that, I didn't have to 'refresh library metadata;' just "Scan Library Files" for the specific library and it's fixed!
Worked perfect, thanks for that!
Does anyone know how to force filename as sort order name ?
Post a Comment