Duplicate movie metadata, problem with smart collections

Server Version#: 1.26.2.5797-7000
Player Version#: N/A

When I create a smart collection, let’s say all movies with Al Pacino, the actor’s names are listed twice in the dropdown (no, there aren’t any hidden spaces). So I add both names to the filters as separate rules and it seems to work OK. After each of the last few updates, one of the actor’s names in the filters changes to a number (no idea what the number is or where it comes from) and then the smart filter fails to find an actor with that number as their name and the collection becomes empty. It appears as though the updater is trying to fix the duplicates, but not doing it correctly. Attached is an screenshot of the duplicate metadata…

This could have happened if you changed the agent but didn’t refresh the library metadata. In such a situation Plex could end up with the same actor being referred with different unique identifiers (based on the underlying agent).

There’s also been some change to the way Plex handles actors approx. 6 months ago that basically did the same.

TL;DR: Refreshing your library’s metadata should fix this. If the results don’t immediately show, you might need to optimize the database too (or wait for a scheduled task to do that automatically).

Thanks for the suggestion. I just tried refreshing metadata and rebuilding the database and it seemed to fix some, but not all of the duplicates.

Could be some cached information.
Have you already tried reloading the web app?

Yes, rebooted, cleared cache, etc. Still the same.

Check for database corruption.

Pull the server log files (Settings → Troubleshooting). In Plex Media Server.log (and .1 to .5), search for any line with ERROR - SQLITE3:.

Example:
Aug 09, 2019 10:03:44.386 [0x700002c15000] Error — SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]

1 Like

Looks like the same issue I reported with music genres here.

Nothing found in any of the logs with this text.

Dang. @tom80H’s suggestions & fixing database corruption usually resolve such problems.

One more question: If you select the different listings for each actor listing do you see different movies? ex: pick just the first Gene Kelly - what movies appear; repeat with second Gene Kelly, do you see the same or different movies?

On the off chance this helps did you also optimise the db after refreshing ALL libraries metadata? One of things optimise does is rebuild the search index so it is might help if you have not already tried it.

Also, how many libraries do you have? Cast are scoped per library so you might get multiple returns if a cast member is listed in various libraries.

Yep… it seems like some “in between” state.
Going by Ford’s approach could help pinning down what libraries might still have old references/IDs. Otherwise the nuclear option should certainly be a refresh of all libraries

@FordGuy61 When I select the first entry for Gene Kelly, I get different films than I get for the second. So I added both to the Smart Collection as a workaround. But when Plex updates (or something else changes around that time), one of the “Gene Kelly” entries changes to a seemingly random number.

@anon5074910 @tom80H Yes, I did that. I have 11 libraries. And Gene Kelly is only in one of them.

Thanks for the update.

The number is probably the Role id for him in the Plex database. It is visible if you look in the XML Info for a movie:

Role id="46636" filter="actor=46636" tag="Gene Kelly" role="Pinky Benson" thumb="https://metadata-static.plex.tv/8/people/8c929d36b8a395d851fd4c7abd6e7b18.jpg"/

Since Gene Kelly appears twice, there are most likely two Role IDs in the database (same for other duplicate actors). Refreshing the metadata is supposed to clean up the duplicates.

A Plex Dance should fix the situation for a specific movie. However, I’ve no idea which movie should be “danced,” - one from the first listing or one from the second.

Could you try Plex Dancing two of the Gene Kelly movies - one from each sort of his name? Then refresh the metadata for the library and optimize the database. You can dance both movies at the same time.

If that does not clean up one of the movies then something strange is happening.


FYI, the Role ID for an actor is unique to a Plex Server. Gene Kelly will have a different number on your server.

For the Gene Kelly films, this is the XML for the two menu entries (different films and different matches for the smart filter)::

<Role id="161183" filter="actor=161183" tag="Gene Kelly" 
<Role id="199877" filter="actor=199877" tag="Gene Kelly"

So the refresh metadata setting isn’t fixing this issue. So I tried the Plex Dance and nothing changed… The ID is still the same in the XML. So I did another metadata refresh (I don’t use “optimized” versions of media) and still no change.

Could this just be two different Gene Kelly’s ? (Sorry had to ask) :slight_smile:

Reason I ask is that checking on https://watch.plex.tv I can find three different records for Gene Kelly name …

https://watch.plex.tv/person/gene-kelly
https://watch.plex.tv/person/gene-kelly-2
https://watch.plex.tv/person/gene-kelly-3

The other thing that comes to mind is related to your 11 libraries. Are they ALL using the new modern scanner/agent. Could it be possible one library is using the new scanner/agent and another one is using the legacy one ?

Definitely the same Gene Kelly. There are other actors that are duplicated as well, but just trying to troubleshoot with this one. The movies are all in one library and there are no other Gene Kellys in any other libraries. This library uses Plex Movie for Agent and Scanner.

Could you give me two examples of the movies which have the different Gene Kelly’s?

Are the two odd movies out actually matched?

Could you check the XML info and see what the guid value for each is?

The title of “That’s Entertainment” indicates that the library has “Prefer local metadata” activated.
Cast lists can also be embedded in mp4 files, and they are not “matchable” to the actors which Plex is delivering.

I recommend disabling that setting, and then Refresh Metadata of these movies again.