# Plex WRONGLY MERGING files across multiple folders (within the same library)

**URL:** <https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524>\
**Category:** Metadata & Adding Files\
**Tags:** library-management\
**Created:** [April 11, 2019, 12:03pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524 "2019-04-11T12:03:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 11, 2019, 12:03pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/1 "2019-04-11T12:03:47Z")

</div>

I have a library for courses. Some of them gets updated as the framework evolves. However I intend to keep them in separate folder per relevant version. Thus the same file can exist in multiple folders **(they might have different naming because of numbering those files though)**.

Example:

- Angular 4 - 100 files
- Angular 5 - 100 files same files + 20 additional
- Angular 6 - 100 files + 20 files + another 20 files..

So the end result plex produces is that when in folder view in certain course folder I have mixed files from different folders. This creates big confusion!

## What’s on disk in the specific folder

 ![image](https://global.discourse-cdn.com/plex/original/3X/4/4/443fd141d9ce4aa8784a24e25517250ccd36b5e6.png)

## What is Plex showing for the same specific folder

 ![image](https://global.discourse-cdn.com/plex/original/3X/b/7/b7c7c500608ea5722e9544a02f3863c978e6c163.jpeg)

**How come some files are even missing??**

Did the library deletion and created it from scratch, seemed as expected for the short time, but a bit later it created the same mess again.

anyway the library settings is for the general video files.

Server Version#: 1.15.3.876  
Player Version#: web

Appreciate, Michal

**EDIT:**  
So basically I dont want PLEX to try to merge similar files together at ALL, just display them as they are on the disk.  
When selecting **Folder** view I suppose this is the desired outcome.

At the moment folder looks like this:

 ![image](https://global.discourse-cdn.com/plex/original/3X/9/7/97c51a7e6629f00306a97e653ba25c70a514ef82.jpeg)  
Which is completely wrong and messed up (even missing files)!

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 11, 2019, 2:08pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/2 "2019-04-11T14:08:14Z")

</div>

What type of library do you have those in?

Must be of type `Other Videos`

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 11, 2019, 2:24pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/3 "2019-04-11T14:24:01Z")

</div>

Sure they are, that’s what I meant by “general videos”…

 ![image](https://global.discourse-cdn.com/plex/original/3X/3/0/307c5d64aa2429e76b227b061db4e68c2afd6808.png)

---

<div class="post-metadata">

**Author:** ![NewPlaza](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/newplaza/32/128634_2.png) [@NewPlaza](https://forums.plex.tv/u/NewPlaza)\
**Post date:** [April 11, 2019, 2:29pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/4 "2019-04-11T14:29:45Z")

</div>

Here’s a very similar issue here.

> [@Turn off the auto-MERGING of video files](https://forums.plex.tv/t/turn-off-the-auto-merging-of-video-files/230565):
>
> I do not want Plex to merge my files IN NO EVENT. I do not use it at all, I do not need the merge, but Plex insists on incorrectly merge dozens of video files. How can I disable this function?

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 11, 2019, 2:34pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/5 "2019-04-11T14:34:00Z")

</div>

What Scanner and agent are you using for the library?

Should be: ![Scanner](https://global.discourse-cdn.com/plex/original/3X/a/a/aaca30c26e603ad27a5ee0f527f80033f25c5e5b.png)

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 11, 2019, 2:48pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/6 "2019-04-11T14:48:30Z")

</div>

Clearly this is bug and needs solving asap. Resulting with the statement users are naming files wrongly is so inappropriate… Especially if we are not in charge of the naming… Consider example of tons of files from the camera… If plex offers folder view then it should behave accordingly on every aspect not just semi-corrupt attempt which leads into such a mess.

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 12, 2019, 9:16am UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/7 "2019-04-12T09:16:38Z")

</div>

sure, thats by default anyway:  
 ![image](https://global.discourse-cdn.com/plex/original/3X/d/f/df0872cdc83cc32c1ab5065d65d9432788b24c3e.png)

can we please promote this to the developers? in that [other thread](https://forums.plex.tv/t/turn-off-the-auto-merging-of-video-files/230565/94) are other aspects of this bug…  
thanks

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 12, 2019, 10:25pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/8 "2019-04-12T22:25:26Z")

</div>

> [@MacGyver27](#):
>
> can we please promote this to the developers? in that [other thread](https://forums.plex.tv/t/turn-off-the-auto-merging-of-video-files/230565/94) are other aspects of this bug…  
> thanks

I don’t have devs on a leach 😉

But what I can do, is create an incident when I can reproduce, and currently can’t

So I need logs in debug mode, as soon as this happens

> [@MacGyver27](#):
>
> sure, thats by default anyway:

True, but I have no way of knowing if you changed it 😉

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 12, 2019, 11:40pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/9 "2019-04-12T23:40:50Z")

</div>

So created library from the scratch called TESTBUG to point just to the “angular” courses folder. Right after it was done scanning I captured the debugging logs.

Before:

 ![IMG_20190413_014551](https://global.discourse-cdn.com/plex/original/3X/0/3/03812e598a31d8663a0b3fe35e0cb40ba625ed5f.jpeg)

After:

 ![IMG_20190413_014607](https://global.discourse-cdn.com/plex/original/3X/7/8/78c42e133c014b54e4c009803fba240e0fef9b8f.jpeg)

And the LOGS:  
[Plex Media](https://forums.plex.tv/uploads/default/original/3X/d/c/dc5adb853ec5d0c22f66410fd84561e2e20026cc.zip) (5.1 MB)

In any case here to help 😉 appreciate, Michal

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 13, 2019, 8:49am UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/10 "2019-04-13T08:49:15Z")

</div>

Sadly, too much is going on, so logs roll over!

When said, I did notice the following:

You are using some kind of nbz downloader, and added it’s download directory to a library, if I read the logs correctly.  
That’s very bad, and should be avoided. Please keep that out of Plex library folders

Ref:  
`/usr/lib/plexmediaserver/Plex Media Scanner --scan --refresh --section 27 --directory /plex/media/.downloads`

Above is also using the `Plex Video Files Scanner` ?

When above directory/library is removed from Plex, do the Plex Dance on your Angular training medias, and after that, upload fresh set of logs

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 15, 2019, 7:52pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/11 "2019-04-15T19:52:39Z")

</div>

Sorry for late response, weekend getaway…

> [@dane22](#):
>
> You are using some kind of nbz downloader, and added it’s download directory to a library, if I read the logs correctly.  
> That’s very bad, and should be avoided. Please keep that out of Plex library folders

Why? I don’t see any reason… If you are concerned of the downloading parts being constantly scanned it’s fine, they don’t have a valid media extension so they shouldn’t get into Plex library anyway. Those parts just gets into logs and in real they are ignored.

The valid use case for this is when you want to start watching something just being downloaded in sequential order - so by the end of a movie it will gets completely downloaded.

> [@dane22](#):
>
> Ref:  
> `/usr/lib/plexmediaserver/Plex Media Scanner --scan --refresh --section 27 --directory /plex/media/.downloads`
> 
> Above is also using the `Plex Video Files Scanner` ?

Correct:  
 ![image](https://global.discourse-cdn.com/plex/original/3X/a/0/a060c10c7863758b56d4a7b554f2055b9a5dcb18.png)

Fresh logs - testing library is now called TESTBUG4: [Plex Media](https://forums.plex.tv/uploads/default/original/3X/b/9/b9808b6a7d4192dffdd728a460beaba4e9847ed1.zip) (6.6 MB)

**Bottom line, results is exactly the same as before.**

Thanks

---

<div class="post-metadata">

**Author:** ![NewPlaza](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/newplaza/32/128634_2.png) [@NewPlaza](https://forums.plex.tv/u/NewPlaza)\
**Post date:** [April 15, 2019, 7:55pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/12 "2019-04-15T19:55:21Z")

</div>

> [@MacGyver27](#):
>
> If you are concerned of the downloading parts being constantly scanned it’s fine, they don’t have a valid media extension so they shouldn’t get into Plex library anyway. Those parts just gets into logs and in real they are ignored.

ALL files get scanned. Whether or not plex does anything with them afterwards is moot.  
More importantly, any time the file changes will flag plex to re-scan. So, if you are downloaded a file and it’s being saved in chunks, plex will see this and re-scan the file all over again. Just fyi.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 15, 2019, 7:58pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/13 "2019-04-15T19:58:34Z")

</div>

> [@MacGyver27](#):
>
> Why? I don’t see any reason… If you are concerned of the downloading parts being constantly scanned it’s fine, they don’t have a valid media extension so they shouldn’t get into Plex library anyway. Those parts just gets into logs and in real they are ignored.

PMS checks the timestamp of the directories, and since last updated is changed constantly, PMS, keeps adding it to inotify, as well as add it to the scanner queue.

As such, this is putting unneeded work to PMS workload, as well as your logs roll over with irrelevant entries.

And no idea about the impact on the agent/scanners here. (In theory, they should be fine, but…)

And no need to look at your logs then I guess 😉

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 15, 2019, 8:47pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/14 "2019-04-15T20:47:25Z")

</div>

> [@dane22](#):
>
> And no need to look at your logs then I guess

Why? I removed that “download” library before as requested 😉

to be more precise, I deleted that problematic library, restarted plex, added new library from scratch and once plex finished dance I captured the logs 🙂

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 15, 2019, 9:07pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/15 "2019-04-15T21:07:29Z")

</div>

> [@MacGyver27](#):
>
> Why? I removed that “download” library before as requested

LOL, and sorry, but from your post, it did sound like you didn’t 😉

When said, there’s still too much going on @ your server, so logs still roll over sadly.

As such, I need you to increase the amount of log files kept from 5 to 10

See: `LogNumFiles` in this article: [https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/](https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/)

And after changing it, restart PMS for it to get picked up, and create `TESTBUG5`😉

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 15, 2019, 9:09pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/16 "2019-04-15T21:09:56Z")

</div>

will test it from scratch with only that single library in PMS… give me 20 minutes…

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 15, 2019, 9:10pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/17 "2019-04-15T21:10:35Z")

</div>

Note though that I’m on GTM +1, so bed time very soon 😉

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 15, 2019, 10:21pm UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/18 "2019-04-15T22:21:47Z")

</div>

Same as I 😃

BTW completely fresh install and single TESTBUG5 library:

 ![image](https://global.discourse-cdn.com/plex/original/3X/f/7/f7c027ad58b972ae6083e1fa4cc494f8aa663f97.jpeg)  
 ![image](https://global.discourse-cdn.com/plex/original/3X/5/f/5fa2a27fa861f1c8443808f8b7034c46876744a6.jpeg)

LOGS:  
[Plex Media](https://forums.plex.tv/uploads/default/original/3X/a/1/a1978078792b7843f1e8544e5389fe968617047a.zip) (4.6 MB)

Thanks

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [April 18, 2019, 9:34am UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/19 "2019-04-18T09:34:45Z")

</div>

Logs only go back to 5 items, so are you sure you increased the setting named `LogNumFiles`, and restarted PMS afterwards?

---

<div class="post-metadata">

**Author:** ![MacGyver27](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/macgyver27/32/92928_2.png) [@MacGyver27](https://forums.plex.tv/u/MacGyver27)\
**Post date:** [April 18, 2019, 9:37am UTC](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524/20 "2019-04-18T09:37:53Z")

</div>

> [@dane22](#):
>
> LogNumFiles

sorry, thought it won’t be the case when doing fresh setup… I’ll get back here shortly with new logs, thanks

[Next page](https://forums.plex.tv/t/plex-wrongly-merging-files-across-multiple-folders-within-the-same-library/398524.md?page=2)
