Media not being shown in library

Server Version#: 1.41.0.8994
Player Version#: 10.22.0.1559

Hi, I am using the latest stable server version on my synology nas through docker container, and recently there when adding new content or even changing older video copy to a different copy, my library does not show anything has been added.
I have attached server log from when a movie changed copy, essentially changing different versions of a movie, but nothing popped up in recently added row in plex app and the movie in my library shows the movie was unavailable.
I had to manually scan my library for the movie to appear available. This is the same case when adding new other movies, and tv shows, to the library as a new entry or new tv episodes.
The server log attached is from when I updated a copy of a movie to a different version.
Plex Media Server Logs_2024-10-07_12-10-36.zip (4.5 MB)

If you have an existing Movie in your library and you replace the file with a new one, with the same or very similar filename, then Plex will update the metadata for that file and nothing else.

It does not count as a new addition to the library because it already existed in the DB.

If you make significant changes to the filename then Plex will see it as a new addition and it will destroy the previous DB record and replace it with a new one.

Keep in mind that Plex ignores everything after the Year that is not contained within curly brackets when trying to find a match etc. and Plex is reasonably flexible when it comes to filenames, but it’s not that flexible.

I did notice a small issue with one of your filenames though.
Despicable Me (2010) [imdb-tt1323594][Remux-2160p][DV HDR10][DTS-X 7.1][HEVC]-FraMeSToR.mkv

You should name it like so:
Despicable Me (2010) {imdb-tt1323594}.mkv

All relevant data such as resolution, audio etc. can be found using Get Info in Plex or you can use the standalone MediaInfo running on your PC if needed.

MediaInfo is also available on your NAS from the Community repository in Package Center.
Access to MediaInfo is then available via SSH.

Add https://packages.synocommunity.com/ in Package Center > Settings > Package Sources to bring up the Community repository.

The use of curly brackets around the IMDB ID will allow Plex to automatically search for that ID and hopefully, download the relevant metadata from that source if not available elsewhere, as depicted in the examples shown here:

/Movies
   /Batman Begins (2005) {imdb-tt0372784}
      Batman Begins (2005) {imdb-tt0372784}.mp4

https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/

Thank you for the detailed response, despicable me was the movie I updated my copy and it was showing unavailable until after manually had to scan my movie library. But even if adding news movies or tv shows, nothing would show automatically, I would have to manually scan the library .

I never had issues with the file names prior. Only recently having issues with items not showing in my plex library.

Yeah with Plex file naming, you never have issues until you do.

From what you are saying, it seems that you may have a DB issue or possibly a NAS performance issue.

That is, the NAS is busy just as Plex is trying to update the metadata/DB. Internet dropouts are another possibility.

In any case, try running @ChuckPA’s Plex database repair script on your NAS. You will find it here: GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases

And don’t worry, Chuck is a Plex employee, so there’s nothing dodgy about it … maybe … lol

I resemble… err… resent that remark :stuck_out_tongue:

lol

Lol. I have used the DBRepair script once before, but cannot remember what I have done before. I am using docker container in my Synology nas and when I try to run the script I get:
Error: Unknown Host

DBRepair supports most containers … must be run from INSIDE the container.

If the container image is recognized, you’ll be able to stop plex safely and run DBRepair.sh

If not, as I document in the README.md

  1. Stop Plex
  2. Invoke DBRepair in full manual mode:
sudo ./DBRepair.sh  --sqlite '/path/to/Plex SQLite' --databases '/path/to/plex/Databases/directory'

I am not sure where the SQLite is, but even stopping and going into the folder “plex/config/Library/Application Support/Plex Media Server” to run the sh script I still get the same error.

@Basche

You’re using Container Manager on a Synology?

I went to install Container Manager so I can help. I can’t find it. Can you help me figure out where it is so I can install and assist ?

Hi Chuck, that is correct I am using container manager, and create a folder called plex, and the sub folder I called config, that is where I installed plex image. What do you mean by your question of where it is?

@Basche

I apologize for the delay.

I had to install Container Manager and then do a lot of digging in the Synology filesystem to figure out how things are done.

One of the things I have confirmed is good news.

  1. In spite of where Synology hides the actual container and its contents,

  2. We can run DBRepair.sh even if we place DBRepair.sh in one of our media folders :slight_smile: The only difference is how we invoke it. (It’s fully self contained so will run from anywhere)

  3. Whose image are you running?

Hi Chuck, running the official plex docker image.
https://registry.hub.docker.com/r/plexinc/pms-docker/

Another item I noticed is that marking a tv episode as watched, does not put the next episode on the continued watching row.
For example if I have marked watched episode 1 of a show, episode 2 should appear in the continue watching row. But this does not happen. I have tried this with android tv app and web app, through app.plex.tv. The only way to get it working is watching last few minutes of the episode and then I see the next episode on continue watching row. FYI, this happens on multiple tv shows, not a specfic TV show.

  1. Continue Watching will “stick” where you start watching it. (there is confusion about that so I’m restating here)

  2. What you’re describing is “On Deck”. The best way I know to describe it is here: “Home” page and “Home” tab, Now look at Continue Watching. In this screenshot you can see where it will pick up for me. If I click through here, it will update as it should. If i circumvent this page, going directly to the server, Continue Watching is out of the loop. I think by your marking it on the server, you’re causing that circumvention. PMS will catch up when it syncs again but it’s not immediate as it otherwise would be directly through “CW”

We can run DBRepair.sh even if we place DBRepair.sh in one of our media folders :slight_smile: The only difference is how we invoke it. (It’s fully self contained so will run from anywhere)

My media is on a separate volume compared to the docker container. I tried to place the DBRepair.sh file there and no luck. Not sure what I need to do to run the script.

What you’re describing is “On Deck”. The best way I know to describe it is here: “Home” page and “Home” tab, Now look at Continue Watching. In this screenshot you can see where it will pick up for me. If I click through here, it will update as it should. If i circumvent this page, going directly to the server, Continue Watching is out of the loop. I think by your marking it on the server, you’re causing that circumvention. PMS will catch up when it syncs again but it’s not immediate as it otherwise would be directly through “CW”

I went directly into the library and then marked episode 1 of the tv show as marked. Are you saying from this method the Continue watching row from the Plex home will only show episode two when my server syncs? If that is the case, how do I know when my server syncs because it could be the same as when new media gets added to the server.

@ChuckPa - Any clue on getting the DBRepair.sh script to run? I still get the error unknown host message.

@Basche

I have provided a means for DBRepair to run outside containers and hosts it doesn’t understand.

In the Release Notes for v1.06.01, you will find --sqlite and --databases options
(Documented in the README.md)

As of 1.03.00, you also have the “UPDATE” command where DBRepair will update itself if a newer version is available.

--sqlite and --databases allows you to run DBRepair.sh

  1. Outside the container
  2. In any unknown configuration when
    – Path to Plex SQLite is known
    – Path to the Plug-in Support/Databases directory is known

I am not sure where the path to SQLite is, but even running the script in the databases directory had the same error message.
One update is I was able to find SQLite, but for some reason it says the SQLite directory is invalid. I did trying confirming the SQLite location, but even still issues.

@Basche

Running anything in Docker on Synology, because of how they manage storage, results in complex directory naming.

For example, for me to access “Plex SQLite” in a docker container on my DS920,
the path is:

/volume1/@docker/aufs/diff/296a2b5ccd0f0850a40ba5a10e7a40e58c8d6bb0a5f2980e8ffb7bc68fc51b66/usr/lib/plexmediaserver/Plex SQLite

This makes the DBRepair.sh command line very complex

./DBRepair.sh --sqlite "/volume1/@docker/aufs/diff/296a2b5ccd0f0850a40ba5a10e7a40e58c8d6bb0a5f2980e8ffb7bc68fc51b66/usr/lib/plexmediaserver/Plex SQLite" --databases "/volume1/@docker/volumes/ec0a09983f6d42e4eada960817275d0c3d3b445e4475ddb3631a4339d44f88b0/_data/Library/Application Support/Plex Media Server/Plug-in Support/Databases"

I have to use the find command to locate where everything is.