Trying to move library files, plex is losing metadata due to manually matching movies!

Help, I’m trying to move my movies files from one nas to another. I’ve followed the guides and I’m sure they work if you use the plex naming conventions. I unfortunately did not and have almost 3k files that had to be manually matched. Now that they are matched when I copy the files to the new nas, add the folder to the library (turning off auto trash empty, etc) plex finds the files but adds them as a second unmatched file instead of a second copy of the original! It took a long time to match that many files and I’d hate to have to do it again. I’ve even tried changing the host file to point the plex server (windows based) to the new nas with no luck, I get file not found errors. Any help would be appreciated!

One thing that can be done is to mess with the scanner file (well, actually, make a copy of it, append Custom to the name, then modify it is the easier way) - in my library, the reason things don’t match is that I add extensions like .hevc or .720p, so a file might look like “The Fifth Element.4krip.atmos.cmt.mkv”.
You can create a custom scanner file pretty easily that will add “ignored” extension - that solved my problem for me, but might not solve yours, since you don’t say why the names don’t match…

@mdchaser said:
Help, I’m trying to move my movies files from one nas to another. I’ve followed the guides and I’m sure they work if you use the plex naming conventions. I unfortunately did not and have almost 3k files that had to be manually matched.

Your only chance would be this procedure:
https://forums.plex.tv/discussion/comment/1080551/#Comment_1080551

@quinnmjcj said:
One thing that can be done is to mess with the scanner file (well, actually, make a copy of it, append Custom to the name, then modify it is the easier way) - in my library, the reason things don’t match is that I add extensions like .hevc or .720p, so a file might look like “The Fifth Element.4krip.atmos.cmt.mkv”.
You can create a custom scanner file pretty easily that will add “ignored” extension - that solved my problem for me, but might not solve yours, since you don’t say why the names don’t match…

That is exactly what I’m looking for! I do the same thing, I append the type of codec, etc to the end of the file and it throws plex off. Can you point me to the location of the scanner file? I’ve got plex installed on a windows machine.

Thanks!

@OttoKerner said:

@mdchaser said:
Help, I’m trying to move my movies files from one nas to another. I’ve followed the guides and I’m sure they work if you use the plex naming conventions. I unfortunately did not and have almost 3k files that had to be manually matched.

Your only chance would be this procedure:
https://forums.plex.tv/discussion/comment/1080551/#Comment_1080551

Great link, if I hadn’t already re-done half of my library that would have been perfect. I’ll store it for next time, I’m sure I’ll be moving it again at some point… Wish they made this type of thing easier.

Bite the bullet and rename your files. If you ever have to migrate your server or rebuild your server or whatever, reimporting them is a breeze.

Now let me make your life easier:
a) use filebot. There’s a CLI version, and a paid drop-and-drag GUI version. This makes the whole process almost effortless.
b) put every movie in a properly named folder. In some cases you dont even have to rename the movie file, just having a properly named folder makes Plex happy. A properly named folder is: Name Of Movie (year)
c) properly naming movie files with all the other info is effortless once you realize Plex seems to stop scanning anything after the year. In my library that movie is named: The Fifth Element (1997) RM4K.1080p.x265.AAC7.10bit.mkv
you can use periods or spaces, Plex doesn’t seem to care one way or the other. The key is you HAVE to have a year between the movie name and the other stuff to consistently get a good match. Did I mention filebot makes this nearly effortless?
d) directory structure mostly doesn’t matter. You can go crazy with nesting. Plex wont honor any of it, but it doesn’t interfere with the scanner and it helps the dumb human that has to keep all this stuff organized.

The scanner file(s) are in Library/Application Support/Plex Media Server/Scanners.
There’s Movies/Plex Movie Scanner.py, Movies/Plex Video Files Scanner.py and Common/VideoFiles.py

In Common/VideoFiles.py, I add things to ignore_suffixes - like so:
ignore_suffixes=[’.dvdmedia’, ‘.q[0-9]+[a-z]’, ‘.q[0-9]+’, ‘.dtshd’, ‘.dts’, ‘.cmt’, ‘.thd’, ‘.atmos’, ‘.nmr’, ‘.dcsubs’, ‘.1440’, ‘.4kcap’, ‘.4krip’, ‘.4k’, ‘.flac7’, ‘.flac2’, ‘.dc’, ‘.ac3’, ‘.qbray’,
‘.bray’, ‘.aac2’, ‘.aac’, ‘.flac’, ‘.[0-9]+x[0-9]+’, ‘.dvr’, ‘.dvd’, ‘.hevc’, ‘.[0-9]+p’]

In Plex_movie_Scanner_custom.py (copied from Plex_movie_Scanner.py), I modified the first few lines like:

sys.path.append("/mnt/cache/apps/Plex/Library/Application Support/Plex Media Server/Scanners/Common")
import Media, VideoFilesCustom, Stack, Utils

and everywhere in the file where there’s VideoFiles., I modify it to VideoFilesCustom.

I don’t bother with change Plex Video Files Scanner

I forget where I found the information on this, but you might be able to search for plex custom scanner and find some of the original material I used to do this…
Good luck.

Oh yeah - one last thing. Under Movies/Edit/Advanced, change the scanner to Plex_movie_Scanner_custom (or whatevery you named your new movie scanner to).

You guys are awesome, thanks for the advice! I’ve decided to bite the bullet and rename them so they work properly. Its time consuming but it will save me a lot of pain in the future I think.