I am in the process of transferring my plex metadata from windows to my new QNAP plex server. I copied the metadata over and mapped “TV shows” and “Movies” to the new directory, however the TV shows aren’t being read or updated for the filepath. The movies folder works just fine, but the TV shows directory isn’t working. I’m not exactly sure what to do, I dont think its a file permission issue since Plex is installed with admin user by default. I’ve attached the TV show directory. Is there a way for me to fix this?
I have an idea but wish to verify. (full migration of metadata from Windows , without cleanup of data directories, usually causes matching problems because of CR/LF vs LF (end of line character) differences between Windows and Linux respectively.
Please take a look and let me know what you think. It’s weird how the items in my library doesn’t update the path when I scan the TV shows library. Hopefully there’s something in the logs that will help.
I’m seeing PMS having a lot of trouble matching files because of how you have the names formatted.
This example I show is a movie. Your logs didn’t contain any television episodes.
I assume, based on Movie naming, your TV episode naming to be similar format style.
As example:
/share/CACHEDEV1_DATA/plex/Movies/500 Days Of Summer (2009)/500 Days Of Summer.2009.720p.BDRip.x264-VLiS.mp4"
The name of the directory is correct format but the file name is not.
PMS doesn’t match based on directory name. It groups by directory name.
It matches based on File Name & any embedded data (in MP4/AVI files).
From what I see here, it struggled/struggles with this title.
Proper format, if you wish to keep the extra info would be:
/share/CACHEDEV1_DATA/plex/Movies/500 Days Of Summer (2009)/500 Days Of Summer (2009) [720p.BDRip.x264-VLiS].mp4"
If you wish to make certain there are no leftovers from the migration from windows:
Stop Plex
SSH into the machine
cd /share/CACHE*/.qpkg/PlexMediaServer/Library
cd “Plug-in Support/Data”
rm -rf *
This goes into the Agents caches (in the DATA directory – NOT DATBASES)
and clears everything out.
When you restart Plex and scan/match again, you will not have any files with “CR/LF” (windows End-of-Line) in them. CR/LF on Linux cause the CR (Carriage Return character) to be pulled in as part of the name.
This is known to break matching.
As the new TV scanner comes online and has time to add new media, PMS won’t be sensitive to this anymore. The old scanner (Python based) was sensitive.
My summary:
Get a renaming tool to help with existing media
Check any downloading tools and verify their naming formats comply with Plex naming rules.
Hi there. I tried to do those commands as well as renaming my library with Filebot. Unfortunately plex is not reading or scanning my TV shows directory properly. For some reason, it’s ignoring the files that exist on it and not updating the paths that exist in the metadata. I do have a bunch of TV shows in that folder. I can verify that there are files that should be read there because when I remove my TV shows library and add it again, Plex reads the files and fetches info. However, by doing that, I lose my analytics like watch history, etc that i’m trying to keep.
From that log, that file does not exist since it was trying to pull from my old windows directory. I performed the steps you recommended, and now my entire collection seems like it’s removed from the library (the files are still there). I tried to scan it afterwards and nothing is appearing, even though there are definitely video files on my folders. I’ve attached a log (older one) for the plex server after i performed the above tasks, as well as another log(newer one) that shows after stopping and starting the server and doing a scan after 2 minutes. I’ve attached a screenshot on what my library looks like after the scan, as well as my file directory.
Your logs definitely show the files not being seen and “dead items” being removed.
If you’re mounting a Windows shared folder, you’ll need to see why that mount isn’t available for all processes on the QNAP.
I wish I knew more about windows but don’t. CIFS mounts have always been ‘dark magic’ to me. They only seem to apply to one username. In this case, they need to allow user admin (root:root) (uid 0, gid 0) to access. Most file servers block (squash) root access across the LAN. I would start there.
I am only using the mount for transferring files to the QNAP server. The QNAP server is the one serving plex as well as hosting the files. I’m just accessing it from windows just so that I can have easy access to it.
Is there anything else I can do in order to transfer my watch history? Removing TV shows and adding it again to the same directory works but I want to keep the watch data. Is there a way to transfer that after deleting and recreating the library?
The watch history can be transferred if you’re comfortable with the command line: Direct database manipulation, and both systems used the same Agent settings (all media matched with the same agents (Plex Movie vs Plex Movie, etc).
If this doesn’t line up then the transfer won’t work because the database linking entries won’t exist.
As far as QNAP not finding your media, I’m going to walk all the steps again. This has to be something simple.
Presume the TV series shared folder is in : /share/CACHEDEV1_DATA/tv
The path you point Plex to is: /share/CACHEDEV1_DATA/tv
Each series exists under here in the structure:
a. Series Name/
b. Season NN/
c. Series Name - SxxExx - Optional Title.ext
Where’s the deviation from this form?
Check the folder list for your TV library section.
Make certain it’s pointing where it should be pointing.
The files are there, it seems like there’s some process (maybe some type of configuration or setting in the Library itself from the old system) thats preventing it from being read. Or, something is making plex not read it properly.
EDIT: I am comfortable with the command line as well
See how quickly they are found and metadata retrieved.
I suggest this because I use SxxExx exclusively and have never had a misfire with matching. This includes all 890 test series I have in the QA library.
I took the steps you described: moved Ace Attorney folder, cleared bundles scanned, reformatted the names, moved it back and rescanned. There’s nothing in the library
I think it’s not a media format issue but more of a process preventing plex itself from reading these files. I’m not too sure however, just a wild guess.
I’m seeing a very strange pattern emerging in your logs.
Scan files.
Get to 99%
Restarts scanning
Gets to 99%
Restart - wash-rinse-repeat
Do you have anything writing into the TV shows monitored directories?
If so, and those program(s) are currently active, I have a theory.
I think they’re interrupting the scan before it can complete – which causes it to restart from scratch.
A way to test this is to turn off Automatically Update my Library when changes detected.
Next invoke a “Refresh All Metadata” manually and let it run.
see what we get.
I’m also seeing it repeatedly matching this movie file.
It should not be doing that. Is this a partial file?
Jan 07, 2021 20:07:58.330 [0x7f5880488780] DEBUG - [MI] Opening input file: "/share/CACHEDEV1_DATA/plex/Movies/(500) Days of Summer (2009)/(500) Days of Summer (2009) Bluray-1080p.mkv"
Jan 07, 2021 20:07:58.330 [0x7f5880488780] DEBUG - [FFMPEG] - Opening '/share/CACHEDEV1_DATA/plex/Movies/(500) Days of Summer (2009)/(500) Days of Summer (2009) Bluray-1080p.mkv' for reading
Jan 07, 2021 20:07:58.330 [0x7f5880488780] DEBUG - [FFMPEG] - Setting default whitelist 'file,crypto'
Jan 07, 2021 20:07:58.330 [0x7f5880488780] DEBUG - [FFMPEG] - Format matroska,webm probed with size=2048 and score=100
Jan 07, 2021 20:07:58.331 [0x7f5880488780] DEBUG - [FFMPEG] - st:0 removing common factor 1000000 from timebase
Jan 07, 2021 20:07:58.331 [0x7f5880488780] DEBUG - [FFMPEG] - st:1 removing common factor 1000000 from timebase
Jan 07, 2021 20:07:58.331 [0x7f5880488780] DEBUG - [FFMPEG] - st:2 removing common factor 1000000 from timebase
you also want to fix name …
500 days of summer (2009)
Not to be overly assertive but would you consider FileBot or TheRenamer to help manage the naming?
The ‘Automatically Update my Library’ has been disabled this whole time. I purchased Filebot to rename my files. I just renamed all my movies as well just now and fixed the mapping in movies, you shouldn’t see anything wrong with it now. I’ve attached the logs after renaming and refreshing the metadata.Plex Media Server Logs_2021-01-08_21-46-40.zip (3.3 MB)
Still however, i don’t see my TV shows
Show me the ls -la *1 from the top of the series directory like I show here for Star Trek - Picard.
[chuck@lizum ~.506]$ cd /vie/tv/Star\ Trek\ Picard/
[chuck@lizum Star Trek Picard.507]$ ls -lah *1
total 24G
drwxrwxr-x 2 chuck chuck 4.0K Aug 13 10:23 ./
drwxrwxr-x 3 chuck chuck 4.0K Aug 13 10:20 …/
-rw-r–r-- 1 chuck chuck 2.9G Mar 12 2020 Star Trek Picard.S01E01.Remembrance.mkv
-rw-r–r-- 1 chuck chuck 2.9G Mar 12 2020 Star Trek Picard.S01E02.Maps and Legends.mkv
-rw-r–r-- 1 chuck chuck 2.8G Mar 12 2020 Star Trek Picard.S01E03.The End is the Beginning.mkv
-rw-r–r-- 1 chuck chuck 3.0G Mar 12 2020 Star Trek Picard.S01E04.Absolute Candor.mkv
-rw-r–r-- 1 chuck chuck 1.5G Feb 20 2020 Star Trek Picard.S01E05.Stardust City Rag.mkv
-rw-r–r-- 1 chuck chuck 1.8G Feb 27 2020 Star Trek Picard.S01E06.The Impossible Box.mkv
-rw-r–r-- 1 chuck chuck 4.0G Mar 12 2020 Star Trek Picard.S01E07.Nepenthe.mkv
-rw-r–r-- 1 chuck chuck 1.8G Mar 12 2020 Star Trek Picard.S01E08.Broken Pieces.mkv
-rw-r–r-- 1 chuck chuck 1.5G Mar 19 2020 Star Trek Picard.S01E09.Et in Arcadia Ego (1).mkv
-rw-r–r-- 1 chuck chuck 1.9G Mar 26 2020 Star Trek Picard.S01E10.Et in Arcadia Ego (2).mkv
[chuck@lizum Star Trek Picard.508]$
The next step in debugging this will entail creating a new shared folder and placing one series in it. We will get to the bottom of this.