Metadata not loaded automatically for new files (anymore)

Server Version#: 1.32.1.6999 (Docker)
Player Version#: 4.106.2 (Web)

Hi!
Very recently (I don’t recall if it happened after an update or not), whenever new media is added Plex is loading it and adding it correctly to the Libraries. The media is correctly identified, but the metadata isn’t loaded (Description, Rating, Actors, …). Only when manually clicking “Refresh Metadata” on single media or the library, the Plex Server loads the metadata.
Even stranger, the problem seem to affect only movies, but not tv shows (episodes).

Any clue or any information I can provide additionally to help you help me ?

1 Like

I have the exact same problem on version 1.32.1.6999. It happened after I updated (but I can’t remember from which version).

When new items are added (TV or movies) they only grab title / date / and poster. All other metadata (synopsis, actors, reviews, studios, etc) does not pull until I manually refresh the item. This has been happening a month now. Which log file would I check to begin looking in to what’s going on here?

Also, did you every fix your issue? How are you adding new files to your libraries? I am using the --scan option which is set to be deprecated and removed but hasn’t been yet and nothing in the changelog indicates this would be breaking metadata going forward.

I am also experiencing this only in my movies library, the only thing I have found in the logs is:

Jun 01, 2023 17:55:14.256 [139639718636344] ERROR - [Req#7f9929/MetadataAgent/tv.plex.agents.movie] Unable to find media provider

TV Shows are working fine, its just movies. If i manually click refresh metadata on the individual item, it works fine

Will need to see the DEBUG Logs ZIP file which captures adding a piece of media and then your Refresh Metadata

I suspect one of two things:

  • minor DB damage (easily reparable)
  • kernel table full (also easily reparable)

I’m having the same issue. Would love to know the steps for both issues.

kinda vague ?

Which steps? Which issues?

You said

Blockquote
minor DB damage (easily reparable)
kernel table full (also easily reparable)

But i went to the website and downloaded the latest version and the Metadata started working again even though my server itself said it was on the latest version.

Are you referring to my tool which optimizes and repairs whatever DB damage it can?
Or are you referring to PMS?
I think you’re referring to PMS.

As for the kernel table, here’s the how-to.
It shows how to check if you need it and how to make the changes.
Without seeing logs, it’s impossible to know if this is the problem.

Hi Chuck, indeed I had a low number of max_user_watches. Adjusting it didn’t help. Anyway, please find attached the log. You should find two entries being added and two manual refreshes (and a little bit of noise I didn’t manage to filter - sorry ;)).

I’d appreciate once you have it to let me know or to remove the upload :). In case you need other infos, just let me know

Thanks a lot!

MODERATOR EDIT logs removed.

@Frankaro

Please check PM

Hi,
unfortunately I wasn’t able to find and fix the root cause. But since workarounds come to stay, here is one. I’ve created this script which is triggered every x minutes to scan for movies with missing metadata (It won’t handle movies which aren’t matched) and trigger the metadata refresh via the plex API. If you want also to handle series and other mediatypes, you may modify the query by removing the following part: library_sections.section_type = 1 and

Make sure to populate the variables with your host, plex token and modify the protocol if needed. The database path must be aligned to your setup.

#!/bin/bash

database="/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
plexprotocol="https"
plexhost="{your plex url/host}"
plextoken="{your token}"

query="SELECT metadata_items.id as 'mid', library_sections.name as 'libname', title FROM metadata_items JOIN library_sections on (library_sections.section_type = 1 and library_sections.id = metadata_items.library_section_id) JOIN media_items ON media_items.metadata_item_id = metadata_items.id WHERE summary='' and title != '' and guid not like 'collection:%' and guid not like 'local:%';"

results=$(sqlite3 "$database" "$query")

while IFS='|' read -r mid libname title; do
  echo "Missing metadata for library: $libname, item: $mid - $title"
  curl "$plexprotocol://$plexhost/library/metadata/$mid/refresh" --compressed -X PUT -H "X-Plex-Token: $plextoken"

done <<< "$results"

Same problem here.
Only my movies library doesn’t automatically fetch metadata. The tv librarys work.

Thanks for the script @Frankaro, added this to my server as a workaround, working well

1 Like

I’m having this exact issue, but I don’t know where to look in the logs.

  • TV Shows are added on scan and get metadata immediately.
  • Movies are added on scan but only get metadata if manually refreshed after being added to the library.
    • This is happening for each Movie library.

I am not sure what to try or what logs to look at.

May I please get a full DEBUG Logs ZIP file which captures movies being added but not processed correctly ?

I’ll give it to the Engineer on Monday (if the ZIP is available)

Thanks.

I’m happy to provide this but I will need to know where to look. I am running PMS on ubuntu 18.04

How to enable debug logging:

In your Plex app go to Settings > General > tick “Enable Plex Media Server debug logging

How to download Plex logs:

In your Plex app go to Settings > Troubleshooting > click Download Logs

1 Like

Thanks @RealJerk

@ChuckPa Can I DM thisto you? It seems there might some IP addresses I should be concerned about exposing in the logs I gathered.

After repairing the database, this is still not working. It’s unclear to me if this is an issue specific to me or something that broke because of an update. As a few others are seeing this issue, I’d like to confirm which is the case and take steps to correct it if possible.

@ChuckPa Can @A_87 send you the logs? I suspect that they will identify the issue