# Duplicate movie metadata, problem with smart collections

**URL:** <https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516>\
**Category:** Plex Media Server\
**Tags:** plex-web\
**Created:** [June 10, 2022, 8:31pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516 "2022-06-10T20:31:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 10, 2022, 8:31pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/1 "2022-06-10T20:31:33Z")

</div>

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

 ![Screen Shot 2022-06-10 at 11.09.11 AM](https://global.discourse-cdn.com/plex/original/4X/e/1/c/e1c64632e3df6ad8a5c14fc4b8dca1c6d497733e.jpeg)

---

<div class="post-metadata">

**Author:** ![tom80H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tom80h/32/19753_2.png) [@tom80H](https://forums.plex.tv/u/tom80H)\
**Post date:** [June 10, 2022, 10:23pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/2 "2022-06-10T22:23:24Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 10, 2022, 11:09pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/3 "2022-06-10T23:09:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tom80H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tom80h/32/19753_2.png) [@tom80H](https://forums.plex.tv/u/tom80H)\
**Post date:** [June 10, 2022, 11:20pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/4 "2022-06-10T23:20:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 10, 2022, 11:39pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/5 "2022-06-10T23:39:10Z")

</div>

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

 ![Screen Shot 2022-06-10 at 4.38.39 PM](https://global.discourse-cdn.com/plex/original/4X/0/b/3/0b34311fb0c27f8b054e85865c2214de64725d49.png)

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [June 11, 2022, 12:13am UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/6 "2022-06-11T00:13:50Z")

</div>

Check for database corruption.

Pull the [server log](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) 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]`

---

<div class="post-metadata">

**Author:** ![DesertFly](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/desertfly/32/12695_2.png) [@DesertFly](https://forums.plex.tv/u/DesertFly)\
**Post date:** [June 11, 2022, 2:00am UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/7 "2022-06-11T02:00:48Z")

</div>

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

> [@Duplicate local music genres](https://forums.plex.tv/t/duplicate-local-music-genres/796362):
>
> Server Version#: 1.27.0.5889 I recently noticed I have duplicate genre on all my genres, so basically all shows twice. I use “Prefer embedded tags” and “Genres to embedded tags” I’m not sure when this started it hasen’t been like all the time, I just with this version deleted the library and scanned again still duplicate music genres. [Screenshot 2022-06-09 at 17.23.18]

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 12, 2022, 2:49pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/8 "2022-06-12T14:49:03Z")

</div>

> [@FordGuy61](#):
>
> ERROR - SQLITE3:

Nothing found in any of the logs with this text.

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [June 12, 2022, 3:35pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/9 "2022-06-12T15:35:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [June 12, 2022, 3:40pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/10 "2022-06-12T15:40:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tom80H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tom80h/32/19753_2.png) [@tom80H](https://forums.plex.tv/u/tom80H)\
**Post date:** [June 12, 2022, 3:50pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/11 "2022-06-12T15:50:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 12, 2022, 4:49pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/12 "2022-06-12T16:49:54Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [June 12, 2022, 6:35pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/13 "2022-06-12T18:35:22Z")

</div>

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](https://support.plex.tv/hc/en-us/articles/201998867-Investigate-Media-Information-and-Formats) 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](https://forums.plex.tv/t/the-plex-dance/197064) 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.

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 12, 2022, 9:47pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/14 "2022-06-12T21:47:44Z")

</div>

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

```auto
<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](https://forums.plex.tv/t/the-plex-dance/197064) 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.

---

<div class="post-metadata">

**Author:** ![anon5074910](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@anon5074910](https://forums.plex.tv/u/anon5074910)\
**Post date:** [June 12, 2022, 9:58pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/15 "2022-06-12T21:58:05Z")

</div>

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

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

```auto
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 ?

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 12, 2022, 10:39pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/16 "2022-06-12T22:39:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![drzoidberg33](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drzoidberg33/32/4184_2.png) [@drzoidberg33](https://forums.plex.tv/u/drzoidberg33)\
**Post date:** [June 13, 2022, 8:27am UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/17 "2022-06-13T08:27:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![severdia](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/severdia/32/220294_2.png) [@severdia](https://forums.plex.tv/u/severdia)\
**Post date:** [June 13, 2022, 12:31pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/18 "2022-06-13T12:31:26Z")

</div>

![Screen Shot 2022-06-13 at 5.29.37 AM](https://global.discourse-cdn.com/plex/original/4X/6/4/5/645141035cf22e3f9997507d1895efcf9a5748f7.jpeg)

 ![Screen Shot 2022-06-13 at 5.30.06 AM](https://global.discourse-cdn.com/plex/original/4X/8/3/e/83eff3c098c1d53ba7f648443597647792fb4748.jpeg)

 ![Screen Shot 2022-06-13 at 5.29.26 AM](https://global.discourse-cdn.com/plex/original/4X/4/b/7/4b79b1031e80fa33340b349001e34f585ad565b4.jpeg)

---

<div class="post-metadata">

**Author:** ![drzoidberg33](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drzoidberg33/32/4184_2.png) [@drzoidberg33](https://forums.plex.tv/u/drzoidberg33)\
**Post date:** [June 13, 2022, 12:44pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/19 "2022-06-13T12:44:26Z")

</div>

Are the two odd movies out actually matched?

Could you check the [XML info](https://support.plex.tv/hc/en-us/articles/201998867-Investigate-Media-Information-and-Formats) and see what the `guid` value for each is?

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [June 13, 2022, 12:52pm UTC](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516/20 "2022-06-13T12:52:54Z")

</div>

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.

[Next page](https://forums.plex.tv/t/duplicate-movie-metadata-problem-with-smart-collections/796516.md?page=2)
