How do i fix the duplicate file issue?

Plex is creating duplicate files for some of my movies. This didn’t start occurring until recently. I am running Version 1.10.1.4602. I have tried the following recommended solutions so far:

  • analyze each file in plex
  • rescan library location
  • empty trash and clean bundles
  • replace and delete the library folder/location
1 Like

please describe where you see duplicate files? in your library, in your folders? you’re very vague… some more details to what you experience, maybe some details about the files might be helpful and get you a faster response

@tom80H said:
please describe where you see duplicate files? in your library, in your folders? you’re very vague… some more details to what you experience, maybe some details about the files might be helpful and get you a faster response

Here is an old thread referencing the same issue:

https://forums.plex.tv/discussion/199925/duplicate-movies-no-duplicate-files

Basically, once the item is scanned in my library location, plex is creating 2 files for the 1 file in the library. This is a screenshot of what I see when I check the file details in plex:

1 Like

@trumpy81 said:
If the duplicates reside in your Movies library, then enter your movies library and on the left of the toolbar, click on ‘All’ and then select ‘Duplicates’ from the drop down menu.

That will display any file that has a duplicate. On the posters, in the top right hand corner you will see a blue square with a number in it, that signifies how many copies of the file that have been grouped together.

Click on the poster (avoid clicking on any icons that appear) and then on the right of the toolbar click on … and select ‘Split Apart’. That will then allow you to operate on each file separately in your library. You may edit the file by clicking on the ‘Pencil’ icon that appears in the bottom left corner of the poster.

Unfortunately, the Duplicates function is only available for Movie, TV Shows or Other Videos type libraries. To access the Duplicates function in a TV Show library, you must first display the library by episode, then click on ‘All’ and select ‘Duplicates’.

I appreciate this but I’m looking for insight into why this is happening in the first place. It’s a brand new issue and the strangest part is that it’s not happening with every new file. I’d rather not have to use the split feature 50-60% of the time I add titles. There seems to be something that’s changed with my plex DB. I’ve literally gone years without this issue before now. I’ve posted one of the old links in this thread for people that have reported this in the past. Thanks for your response.

@trumpy81 said:
To try and narrow things down:

First of all, you should move your media to something like C:\Media\MoviesUnderReview … note: no spaces in the folder names.

Secondly, your file is incorrectly named, it should be named Thank You For Your Service (2017).mp4 with the year of release in parenthesis.

Also, double check that all spaces in a file name are in fact spaces.

I would not store any media in a system folder such as C:\Users… because many programs and processes may be trying to access that location at the same time and that may interfere with Plex.

Regardless of whether or not I include the year in the name does not affect this issue. It still creates the duplicate file in plex. While the system folder location may not be a best practice, again, this is brand new issue. Nothing has changed with my setup for 2+ years and yet all of a sudden this issue is occurring.

Hey Trumpy81 -
Yes, it’s an odd issue, more like a BUG I assume. When the library is refreshed you would think that if the record already exists, it wouldn’t duplicate - as you can see from your screen shot, there is NO duplicate file, rather a duplicate reference in the Plex library, showing 2 items.
I ran into this issue a couple months ago (although I’m running PMS on a Ubuntu VM, with PlexPY) and a separate VM which runs W2016S with Sonarr, Jackett) and I ended up disabling SMB1.0, only running SMB3… the problem went away for about a month. Then suddenly last week the problem came back.
Identical issue to you.
So, I don’t think it was a CIFS/SMB issue at all, rather just luck the bug went away.
Odd as well, as if 10 episodes are copied to the PMS Volume, only 2 of them may show up as duplicates. It’s the same volume/same rights/same processes.
I read many replies stating I had to “clean my library etc…” which seemed to be an incorrect method.
Perhaps the issue will be rectified in a future release as I do believe it’s a bug somewhere.

Can you show me this page for that library?

I’m having the same issue, and I’m not running SMB at all, at least not for the Plex server. I am using the proper naming convention, and I still see the same path and filename twice in the Info page. Removing the file from the location, scanning the library and adding it back usually solves the issue, but I’ve stopped doing even that while waiting for the actual fix to be released.

@“MovieFan.Plex” said:
Can you show me this page for that library?

@joelbloomer said:
I’m having the same issue, and I’m not running SMB at all, at least not for the Plex server. I am using the proper naming convention, and I still see the same path and filename twice in the Info page. Removing the file from the location, scanning the library and adding it back usually solves the issue, but I’ve stopped doing even that while waiting for the actual fix to be released.

We probably have similar setups however, not even using the plex dance which is partly what you’re doing, helps my situation. No matter how many times I remove the titles and perform the steps in my first post, it still creates duplicate files yet only for certain titles. For instance, out of the last 10 movies that I added, it synced 4 of them correctly and the other 6 have this issue no matter what I do. The only time the issue corrected itself was when I created a brand new location like the initial location with some of the new titles already moved over. Plex then created the new library without any duplicates, however, it still would not accept any new additions without duplicating them. I’m obviously not going to continue to create and rebuild new library locations whenever I need to add titles. Like you, I’m leaving them out of the library until I find out what’s causing this or if there’s a resolution.

Thanks for the image. It looks right, you only have the 1 folder.

@btmblue said:
For instance, out of the last 10 movies that I added, it synced 4 of them correctly and the other 6 have this issue no matter what I do.

Can you Plex Dance these 10 movies again then get me the entire log package? Let me know what movies show up as duplicates.

Same here. Benn doing this for ever.

@“MovieFan.Plex” said:
Thanks for the image. It looks right, you only have the 1 folder.

@btmblue said:
For instance, out of the last 10 movies that I added, it synced 4 of them correctly and the other 6 have this issue no matter what I do.

Can you Plex Dance these 10 movies again then get me the entire log package? Let me know what movies show up as duplicates.

Thanks for looking at this. I kid you not. I was beginning to do this and I started by syncing (only) the titles that were duplicating. I was going to let Plex duplicate the files and then I was going to remove all 10 titles, perform the plex dance, re-sync them and pull the logs. This time though it worked for some reason!? You have no idea how many times I’ve performed the plex dance with these titles. As I stated on the first post; I’ve also deleted and re-created the entire library location. This is clearly a bug that I hope you guys can get to the bottom of, but these titles are now showing up correctly. If I can leave this thread open I can try to get you those logs the next time this occurs. For now, I’d like to leave the titles synced over if you don’t mind.

We would like to fix it, but we can’t fix what we can’t see. We need to be able to duplicate it or at least see a log from PMS when this happens so we can investigate what is going on. Personally, I’ve never seen a duplicate in my library so I have no idea what could be the cause.

Looking at the XML, it seems that the files are assigned sequential ID numbers. I have Sonarr set to trigger Plex when the file is moved over, and I’m wondering if that isn’t conflicting with the “Update my library automatically” and “Run a partial scan when changes are detected” settings, causing Plex to ‘find’ the same file too rapidly. I have disabled them as a test.

There’s lots of threads regarding this issue, and the advice is always to Plex dance it. That does make the duplicate disappear, but doesn’t address the problem.

I agree with @joelbloomer , Plex is finding the file twice. In fact, I have mentioned that several times in the related threads… Plex finds the file when the changes are detected, and begins the process to identify it, even if the file is not actually finished moving to the new location. Then, once finished with the move, a new scan is triggered, because a change in the drive has been detected, and the same file is re-identified.

It happens more often when moving a large file from one hard drive to another, or over the network. My solution/workaround has been to move the file to a location Plex can’t see on the hard drive, then move it to it’s proper location. That way, the process is basically instantaneous as there is no real disc activity.

@“MovieFan.Plex” said:
We would like to fix it, but we can’t fix what we can’t see. We need to be able to duplicate it or at least see a log from PMS when this happens so we can investigate what is going on. Personally, I’ve never seen a duplicate in my library so I have no idea what could be the cause.

Just happened again with “Dunkirk.” This is a title that was correctly synced, moved to a different folder on a separate hard drive and didn’t sync at all. I then removed it and tried it again and the duplicate issue returned. Logs attached. There’s no rhyme or reason around it. This has nothing to do with the title being moved to a different HDD because the original files that duplicated were all being plex danced and moved around on the same HDD. Tonight’s attempt is what I’ve been seeing for weeks now.

Yep, I’m seeing this also with my new Plex server install on Windows 10. I can re-create this issue every time on my Plex server simply by…

  • Putting my Blue-Ray disc in the drive.
  • Having MakeMkv rip it to a folder in my Movies library

I now too see the little [2 File] icon in the upper left part of the movie cover image, and see the same duplicate file issue as others here. Happens every single time. Let me know what you might need from me to debug this. I took a look in the Plex Media Scanner log file, and I do see the scanner processing the newly added movie twice with different “media item” numbers. I can send the log along if needed.

@leelynds said:
There’s lots of threads regarding this issue, and the advice is always to Plex dance it. That does make the duplicate disappear, but doesn’t address the problem.

I agree with @joelbloomer , Plex is finding the file twice. In fact, I have mentioned that several times in the related threads… Plex finds the file when the changes are detected, and begins the process to identify it, even if the file is not actually finished moving to the new location. Then, once finished with the move, a new scan is triggered, because a change in the drive has been detected, and the same file is re-identified.

It happens more often when moving a large file from one hard drive to another, or over the network. My solution/workaround has been to move the file to a location Plex can’t see on the hard drive, then move it to it’s proper location. That way, the process is basically instantaneous as there is no real disc activity.

The Plex dance does not make the duplicate disappear. It does in some situations but it is not a fool-proof fix to this issue. Does anyone know if the engineers are looking into this?

@“MovieFan.Plex” said:
We would like to fix it, but we can’t fix what we can’t see. We need to be able to duplicate it or at least see a log from PMS when this happens so we can investigate what is going on. Personally, I’ve never seen a duplicate in my library so I have no idea what could be the cause.

Any updates? I would like to know if this has been passed onto the developers. I just tried to add 5-6 more titles and almost all of them became duplicates. I am now running version 1.11.3.4803. This is still an issue. Thanks for your assistance.