Cannot Read TV Shows folder after transferring Plex from Windows

Server Version#: 1.21.1.3876
Player Version#:

Hi there,

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?
Capture

Please do the following:

  1. Verify DEBUG logging enabled.
  2. Verify VERBOSE logging disabled.
  3. Restart Plex
  4. Let sit idle for 2 minutes
  5. Now “Scan files” for the TV section.
  6. When complete,
  7. Download the logs ZIP
  8. Attach the ZIP file here.

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.

Hi @ChuckPa, thank you for your reply. I have attached the logs here: https://drive.google.com/file/d/1-OepBMstcVVDNchSXu0jg3dM6dM6Ocgk/view?usp=sharing

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.

@frankchau93

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:

  1. Stop Plex
  2. SSH into the machine
  3. cd /share/CACHE*/.qpkg/PlexMediaServer/Library

  4. cd “Plug-in Support/Data”

  5. 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:

  1. Get a renaming tool to help with existing media
  2. 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.

I attached logs from after performing those commands.Plex Media Server Logs_2021-01-08_14-23-06.zip (3.0 MB)

@frankchau93

Does this file exist?

Jan 08, 2021 14:18:55.738 [0x7fd5f235f700] DEBUG - Completed: [127.0.0.1:41996] 200 GET /channels/all (11 live) GZIP 0ms 387 bytes
Jan 08, 2021 14:19:04.190 [0x7fd5f2071700] DEBUG - Auth: authenticated user 1 as frankchau93
Jan 08, 2021 14:19:04.190 [0x7fd5d5fc5700] DEBUG - Request: [192.168.86.162:65094 (Subnet)] GET /library/metadata/1468?includeExternalMedia=1&checkFiles=1&asyncCheckFiles=0 (6 live) TLS GZIP Signed-in Token (frankchau93)
Jan 08, 2021 14:19:04.216 [0x7fd5d5fc5700] ERROR - Error opening file '"Z:\TV Shows\Ace Attorney\Season 2\[HorribleSubs] Ace Attorney S2 - 21 [1080p].mkv"' - No such file or directory (2)
Jan 08, 2021 14:19:04.217 [0x7fd5d5fc5700] DEBUG - We're going to try to auto-select an audio stream for account 1.
Jan 08, 2021 14:19:04.217 [0x7fd5d5fc5700] DEBUG - Selecting best audio stream for part ID 1623 (autoselect: 1 language: en)
Jan 08, 2021 14:19:04.217 [0x7fd5d5fc5700] DEBUG - We're going to try to auto-select a subtitle.

What you show me above in the screenshot is:

  1. Initial scan has been completed and the media, as stored in the database, is known to be gone but not yet removed / updated.
  2. The icons haven’t been removed becaus the Trash has not been emptied (yet).

Your logs show me that it’s scanning while attempting to play foreign language content.

The “current” Plex Media Server.log file was captured after 7 minutes since startup.

On a TS-253D, that’s not a lot of time when it’s also serving up.

Please do the following:

  1. Scan Files
  2. Refresh all metadata
  3. Empty Trash
  4. Clean Bundles
  5. Scan files

Hi @ChuckPa

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.

![folders.PNG|690x342] Plex Media Server Logs_2021-01-08_16-33-47.zip (2.8 MB) Plex Media Server Logs_2021-01-08_16-30-13.zip (3.2 MB) (upload://ftFS36o1HfRQ4PqI5gceKmqrI8i.jpeg)
I wonder if there’s something wrong behind the scenes that’s preventing my files from being scanned?

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.

Hi,

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.

  1. Presume the TV series shared folder is in : /share/CACHEDEV1_DATA/tv
  2. The path you point Plex to is: /share/CACHEDEV1_DATA/tv
  3. 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 location of my files is /share/CACHEDEV1_DATA/plex/TV Shows
TV shows in plex is pointed to the above directory.

Here is a screenshot of that directory in QNAP itself. I have TV Shows/Series Name/Season/Show

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

Now that I can see your actual naming format, I am cautious / suspicious of the season/episode designator.

While that’s been an accepted format in the past, it is fading into oblivion.

How difficult would it be for you to:

  1. Move a series (or season) out from the monitored area.
  2. Scan files / Empty Trash / Clean bundles – so it’s clearly gone
  3. Reformat the names to use SxxExx format
  4. Move those files back
  5. Scan Files
  6. 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.


Hi there,

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 :frowning:

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.

If the files are physically on the QNAP, permissions will never stop scanning.

Grab the logs and attach them please.

Plex Media Server Logs_2021-01-08_20-22-03.zip (2.6 MB)
Here you go. Thank you for your time in investigating this

@frankchau93

I’m seeing a very strange pattern emerging in your logs.

  1. Scan files.
  2. Get to 99%
  3. Restarts scanning
  4. Gets to 99%
  5. Restart - wash-rinse-repeat :slight_smile:

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?

Hi there,

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 :frowning:

For one of your TV series, with them now renamed.

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.

list.log (3.0 KB)
Hello,

This is the result from doing ls -al *1 in a series called ‘Ace Attorney’. It has 2 seasons in the folder.

side note: Just doing a normal scan and checking the logs, it does look like it picks up the folders but not the files…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.