Please have a flag to allow duplicate files inside a library

I recently found out the hard way that Plex Media Server does not allow the same physical file to be listed twice or more in a library. I have a library containing personal family videos, each video tagged with metadata indicating who appears on the video, e.g. “DADDY”, “MOMMY”, “CHILD”, “DOG”, etc. Obviously, some videos only contain one person/creature, and some videos contain multiple people/creatures.

I created a simple bash script that creates symbolic links from the original video file. Let’s say there is ORIGINAL.MP4 and it has metadata “MOMMY” and “CHILD” and “DOG”. My script takes the ORIGINAL.MP4 file and makes three new symbolic links pointing to it, namely “MOMMYVIDEO.MP4”, “CHILDVIDEO.MP4” and “DOGVIDEO.MP4”. This is a simplification, as the script also accounts for movie dates and arranges them into series and episodes, but that is beside the point of this feature request.

My target was to create a nice library of “PEOPLE” that has a neat folder for every family member. The end-user can then browse all our family videos arranged by family members, and find videos that feature a specific family member. The end-user goes into “MOMMY” folder and finds “MOMMYVIDEO.MP4” which is actually the same “ORIGINAL.MP4” video mentioned earlier. Then the end-user goes into “DOG” folder and finds “DOGVIDEO.MP4” which is again a replica of the original video.

But alas, it turns out that Plex Media Server detects these videos as duplicate, and disallows the creation of this kind of library. At first I thought there must be something in Plex that detects the symbolic links, but then I read somewhere that it is a hash identification that is calculated for the binary video file. The way Plex Server currently works, is that it may create a folder for MOMMYVIDEO.MP4, but as soon as it finds out about DOGVIDEO.MP4, it removes the previously created MOMMY folder. I don’t like this behaviour, for this specific library, at least.

In any case, it would be nice if I could go into library settings and turn off “Detect and disallow identical files” feature for a specific library. This would allow me to organize the family videos pleasantly, based on who appears in them.

One way to solve my problem, is not to use symbolic links and actually create new copies of the original file, but I specifically would not like to do that, because it consumes a lot of storage (we have thousands of family videos). Also, running the script with copy functionality instead of creating a new symbolic link takes a huge amount of time when the files are being copied over.

Why the redundant entries to start with?
Have you considered to add the information as metadata?
You can e.g. list the people (or pets) as cast members. Plex will list those on a video page of an other-video library and they can be filtered. You can then create a smart collection with all mommy, daddy, child dog videos (or even for specific combinations).

Seems much smoother to me than giving Plex redundant entries (e.g. with the same video marked as watched in its mommy representation while unwatched in its kid and daddy instances.

2 Likes

Hi tom80H,

listing the family members as cast members sounds interesting, and very smart! I’ll definitely dig up (google) some information about that. You mentioned metadata files, so that’s probably where it can be done. Thanks for the good suggestion! And also, a good point about the “watched” flag for redundant entries.

This may not behave the way you expect anyway. If Plex notices they are duplicates it may still suppress them from double display.

Tom’s suggestion is great, and it’s a good idea to keep the way the files are stored on disk conceptually separate from the way they’re categorized and organized and presented in Plex.

Plex can read embedded metadata from your mp4/m4v/mov files. On macOS I’m regularly using Subler to edit the related metadata. You should be able to use mp3tag on Windows to do the same (despite the name).

1 Like

When browsing libraries, I can see “Recommended”, “Library” and “Categories”. Is there somewhere in Plex available an “Actors/Actresses” page?

No. But you could create some smart collections from an advanced filter.

This thread is getting a bit off-topic from the subject line, but could someone please help me further?

I’ve got a media file “Family Life-S2013E0000182.MOV” and a corresponding “Family Life-S2013E0000182.nfo” file, but Plex isn’t reading the xml metadata specified inside the NFO file. Both of the files are located in a folder named “\\diskstation8tb\Photo Export\Exported\Family Life\Season 2013” and Plex can read the media file just fine. It’s just not connecting the metadata to the movie file.

I’ve made sure that the “Local Media Assets” agent is enabled for every single library type that exist, so that’s not the issue. My “Exported” folder is read by Plex into a library named “Home Videos”, which is using “Agent: Personal Media Shows” and “Scanner: Plex Series Scanner”. About the Scanner, I have no idea what that is. About Agents I’ve now read a bit from here and there.

I am assuming there is no full, comprehensive documentation available, since by google I could not find anything else about NFO files except that I should enable the “Local Media Assets”. Even the syntax of the xml data in NFO files is not clear, I’ve used ChatGPT to create the XML file. The content is currently like this, but none of this info is used by Plex:

<episodedetails>
  <title>Family Life Episode 1</title>
  <season>2013</season>
  <episode>1</episode>
  <showtitle>Family Life</showtitle>
  <rating>8.5</rating>
  <plot>This is the detailed description of the first episode of our family life series in 2013.</plot>
  <outline>A brief summary of the episode.</outline>
  <aired>2023-01-01</aired>
  <premiered>2023-01-01</premiered>
  <studio>Doe Family Productions</studio>
  <director>John Doe</director>
  <credits>Written by Jane Doe</credits>
  <writer>Jane Doe</writer>
  <actor>
    <name>John Doe</name>
    <role>John Doe</role>
    <thumb>http://www.example.com/images/John Doe.jpg</thumb>
  </actor>
  <genre>Family</genre>
  <genre>Drama</genre>
  <tag>Family</tag>
  <tag>2013</tag>
  <runtime>42</runtime>
  <playcount>0</playcount>
  <lastplayed>2024-08-10</lastplayed>
  <id>tt1234567</id>
  <thumb>episode1.jpg</thumb>
  <fanart>fanart.jpg</fanart>
  <fileinfo>
    <streamdetails>
      <video>
        <codec>h264</codec>
        <aspect>1.78</aspect>
        <width>1920</width>
        <height>1080</height>
        <durationinseconds>2520</durationinseconds>
      </video>
      <audio>
        <codec>aac</codec>
        <language>eng</language>
        <channels>2</channels>
      </audio>
      <subtitle>
        <language>eng</language>
      </subtitle>
    </streamdetails>
  </fileinfo>
</episodedetails>

Plex reads embedded metadata but not metadata from nfo files.

Aaah, okay. I tried mp3tag but it doesn’t allow me to list cast members …or I didn’t know how to use it, but to me it seems that it only supports a really tiny set of metadata fields.

It appears what I had mentioned was an extension of the id3 tag format specific to iTunes/Apple. While players like VLC seem to support this, mp3tag however doesn’t seem to do so.

mp3tag seems to have an option to display all supported tags. As you pointed out, the default view is quite limited.

You might want to check out TinyMediaManager

Just catching up… is the original suggestion still a thing?
It seems like a multi-level workaround for something that can be achieved much easier…

I was able to make a satisfactory solution by utilizing an external plugin that supports .NFO files as metadata source. The original issue was solved thru some custom scripting and .NFO files.

Thanks for the follow-up tom80H!

2024 clean-up: resolved / obsolete