Plexignore being ignored for newly-added files

Server Version#: 1.19.3.2831
Player Version#: N/A

I have a bunch of .plexignore files set up and they’re broadly working as expected except when a mini-scan is triggered based on new media files being added to a folder.

So for example I have a folder called “Other Videos” that I’m ignoring and as expected it doesn’t show up in my library, however, I just added a bunch of videos to it which Plex immediately picked up and added to my library. If I invoke a manual scan of the library (or wait for the scheduled one overnight) the files disappear again as expected.

I think I understand what you’re describing.
Would you mind sharing your plex ignore file (or the appropriate portion of) so I can recreate what you’re seeing?

*recycle/*
*snapshot/*
Other Videos/*

Please confirm what I should see?

  1. With this .plexignore in place,
  2. I start plex
  3. After Notify has completed setup
  4. I add something to “Other Videos”
  5. I will see the scanner run
  6. The file gets added or doesn’t get added ? <-- to be certain of what I’m looking for.

EDIT: I looked at the source code. The scanner will ignore @Recycle and #recycle (case sensitive). Might the *recycle/* be an incorrect upper/lower case typo or simply incomplete?

The recycle entry is probably obsolete now, it was added back before PMS was automatically ignoring the #recycle folder on Synology devices.

Steps 1-5 are correct.
Step 6. The files(s) appear in the PMS library when they should be ignored.
Step 7. If a manual/scheduled scan of the library is run, the files disappear from the library again.

It seems like the .plexignore file isn’t being checked when the ad-hoc scans are run when new files are detected but then is when “proper” scans run…

Thank you for clarifying the ad-hoc scan.

What should happen is the Notify handler invokes the scanner just as a “Scan Files” does. Now I know my comparison points. Scan files versus “automatically detect changes”.

I am having trouble recreating what you see.

I created:

  1. Shared Folder: “Notify” on volume1
  2. In it, I created “Media”
  3. Under Media, I created “Other Videos”
  4. I placed the .plexignore in /volume1/Notify
  5. I then copied a small movie into /volume1/Notify/Media/Other Videos
  6. It was ignored as shown here.
May 23, 2020 09:47:05.552 [0x7f6a88f1d0] DEBUG - Request: [127.0.0.1:45515 (Loopback)] PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=0 (12 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:05.552 [0x7f6b7351d0] DEBUG - Request: [127.0.0.1:45514 (Loopback)] GET /:/metadata/notify/cullTimeline?librarySectionID=4&sinceTime=1590244025 (12 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:05.552 [0x7f6b7351d0] DEBUG - Asked to cull library timeline before time 1590244025, we're starting with 0 items.
May 23, 2020 09:47:05.552 [0x7f6b7351d0] DEBUG - Library timeline cull complete with 0 items left.
May 23, 2020 09:47:05.553 [0x7fab1bc1d0] DEBUG - Completed: [127.0.0.1:45515] 200 PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=0 (12 live) GZIP 0ms 166 bytes
May 23, 2020 09:47:05.553 [0x7fab1bc1d0] DEBUG - Completed: [127.0.0.1:45514] 200 GET /:/metadata/notify/cullTimeline?librarySectionID=4&sinceTime=1590244025 (12 live) GZIP 0ms 166 bytes
May 23, 2020 09:47:06.154 [0x7f722b31d0] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/Notify/*recycle/*): /volume1/Notify/#recycle
May 23, 2020 09:47:06.161 [0x7f6ab7d1d0] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/Notify/*recycle/*): /volume1/Notify/#recycle
May 23, 2020 09:47:06.170 [0x7f737351d0] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/Notify/*recycle/*): /volume1/Notify/#recycle
May 23, 2020 09:47:06.182 [0x7f6a88f1d0] DEBUG - Request: [127.0.0.1:45526 (Loopback)] GET /:/metadata/updateProgressMessage?message=Scanning%20Media (12 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:06.182 [0x7f6b7351d0] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/Notify/*recycle/*): /volume1/Notify/#recycle
May 23, 2020 09:47:06.183 [0x7fab1bc1d0] DEBUG - Completed: [127.0.0.1:45526] 200 GET /:/metadata/updateProgressMessage?message=Scanning%20Media (11 live) GZIP 1ms 166 bytes
May 23, 2020 09:47:06.198 [0x7f722b31d0] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/Notify/Media/Other Videos/*): /volume1/Notify/Media/Other Videos/Your Friend the Rat (2007)
May 23, 2020 09:47:06.202 [0x7f6ab7d1d0] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/Notify/Media/Other Videos/*): /volume1/Notify/Media/Other Videos
May 23, 2020 09:47:06.207 [0x7f737351d0] DEBUG - Request: [127.0.0.1:45536 (Loopback)] GET /:/metadata/updateProgressMessage?message=Scanning%20Media%2FOther%20Videos (11 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:06.208 [0x7fab1bc1d0] DEBUG - Completed: [127.0.0.1:45536] 200 GET /:/metadata/updateProgressMessage?message=Scanning%20Media%2FOther%20Videos (11 live) GZIP 0ms 166 bytes
May 23, 2020 09:47:06.209 [0x7f6b7351d0] DEBUG - Request: [127.0.0.1:45540 (Loopback)] PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=%2B99&subtitle=Other%20Videos (11 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:06.209 [0x7f6b7351d0] DEBUG - Activity: updated activity 58fc6a8e-2330-419e-8f7c-393704975672 - completed 99.0% - Scanning Notify
May 23, 2020 09:47:06.212 [0x7faaece1d0] DEBUG - Completed: [127.0.0.1:45540] 200 PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=%2B99&subtitle=Other%20Videos (11 live) GZIP 3ms 166 bytes
May 23, 2020 09:47:06.215 [0x7f6a88f1d0] DEBUG - Request: [127.0.0.1:45544 (Loopback)] PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=99.000000 (11 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:06.216 [0x7fab1bc1d0] DEBUG - Completed: [127.0.0.1:45544] 200 PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=99.000000 (11 live) GZIP 0ms 166 bytes
May 23, 2020 09:47:06.222 [0x7f722b31d0] DEBUG - Request: [127.0.0.1:45548 (Loopback)] PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=100 (11 live) GZIP Signed-in Token (ChuckPA)
May 23, 2020 09:47:06.222 [0x7f722b31d0] DEBUG - Activity: updated activity 58fc6a8e-2330-419e-8f7c-393704975672 - completed 100.0% - Scanning Notify
May 23, 2020 09:47:06.222 [0x7f722b31d0] DEBUG - Activity: Ended activity 58fc6a8e-2330-419e-8f7c-393704975672.
May 23, 2020 09:47:06.223 [0x7fab1bc1d0] DEBUG - Completed: [127.0.0.1:45548] 200 PUT /activities/58fc6a8e-2330-419e-8f7c-393704975672?percentComplete=100 (11 live) GZIP 1ms 166 bytes
May 23, 2020 09:47:06.245 [0x7fabde41d0] DEBUG - Jobs: '/volume1/@appstore/Plex Media Server/Plex Media Scanner' exit code for process 29773 is 0 (success)
May 23, 2020 09:47:06.249 [0x7fabde41d0] DEBUG - Collections: Found 0 collections tags in section 4.
May 23, 2020 09:47:06.249 [0x7fabde41d0] DEBUG - Collections: We had 0 collections in the library already.
May 23, 2020 09:47:06.249 [0x7fabde41d0] DEBUG - Collections: Synced tags in section 4 in 0ms.
May 23, 2020 09:47:06.250 [0x7fabde41d0] DEBUG - Collections: Refreshed attributes for 0 collections in section 4 in 0ms.

Having seen this properly ignored, I then:

  1. Created /volume1/Media/Movies
  2. Added another small movie to “Movies”.
  3. It was properly detected.

Not satisfied, I created one more test.

I created an “Other Videos” type library and pointed it to the “Other Videos” folder.
When this was done, it did pick up the previously ignored files.

Is this what you’re seeing;

“Other Videos” type library sections to not honor .plexignore when the library’s root is /volume1/Other Videos as specified in the .plexignore ?

So what I’m seeing, from what I can pick out of the debug logs is:

May 23, 2020 16:13:59.799 [0x7fde44567700] INFO - Library section 6 (TV Shows) will be updated because of a change in '"/volume1/media/Other Videos/Blueprint"/Sew sturdy travel organiser'
May 23, 2020 16:13:59.800 [0x7fde44567700] DEBUG - [Notify] New directory: "/volume1/media/Other Videos/Blueprint/Sew sturdy travel organiser", adding recursively.
May 23, 2020 16:13:59.800 [0x7fde44567700] DEBUG - [Notify] Now watching "/volume1/media/Other Videos/Blueprint/Sew sturdy travel organiser"

May 23, 2020 16:14:04.800 [0x7fde2c4b6700] DEBUG - Library Updater: Requested that section 6 be updated, force=0, deep=0, subdir=/volume1/media/Other Videos/Blueprint iTunes=0
May 23, 2020 16:14:04.800 [0x7fde2c4b6700] DEBUG - Library Updater: Queueing section 6

And then this scanner log file which seems to have been triggered off it.

Plex Media Scanner.3.log (146.0 KB)

Incidentally, this is happening with the #recycle folder as well - I hadn’t noticed it before but I deleted some of the files from the Other Videos folder to copy them back and they appeared in my library:

image
The former is “Other Videos”, the latter “#recycle

If I then run a manual scan the very start of the PMS log is:

May 23, 2020 16:24:31.242 [0x7fde83fff700] DEBUG - Auth: authenticated user 1 as Spad
May 23, 2020 16:24:31.242 [0x7fde2d64a700] DEBUG - Request: [192.168.0.2:29658 (Allowed Network (Subnet))] GET /library/sections/6/refresh (12 live) TLS GZIP Signed-in Token (Spad)
May 23, 2020 16:24:31.243 [0x7fde2d64a700] DEBUG - Library Updater: Requested that section 6 be updated, force=0, deep=0, subdir= iTunes=0
May 23, 2020 16:24:31.243 [0x7fde2d64a700] DEBUG - Library Updater: Queueing section 6
May 23, 2020 16:24:31.243 [0x7fde83fff700] DEBUG - Completed: [192.168.0.2:29658] 200 GET /library/sections/6/refresh (12 live) TLS GZIP 1ms 195 bytes (pipelined: 3)
May 23, 2020 16:24:31.244 [0x7fddff735700] DEBUG - Activity: registered new activity 7c2fe04e-46eb-49d1-bc60-b119d818e1a3 - Scanning
May 23, 2020 16:24:31.244 [0x7fddff735700] DEBUG - Scanning section 6
May 23, 2020 16:24:31.244 [0x7fddff735700] DEBUG - Activity: updated activity 7c2fe04e-46eb-49d1-bc60-b119d818e1a3 - completed 0.0% - Scanning TV Shows

May 23, 2020 16:24:32.894 [0x7fde47fff700] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/media/Other Videos/*): /volume1/media/Other Videos/Fitness Videos
May 23, 2020 16:24:32.897 [0x7fde2d64a700] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/media/Other Videos/*): /volume1/media/Other Videos/Blueprint
May 23, 2020 16:24:32.900 [0x7fde2e88f700] DEBUG - [Scanners.bundle] Removing directory due to plexignore rule (/volume1/media/Other Videos/*): /volume1/media/Other Videos

After which the videos are removed from my library.

Edit: Not sure if I mentioned it but the .plexignore file is in /volume1/media/

That seems to confirm:

  1. Declaring Other Videos as a directory to be excluded (ignored)
  2. When in a library type “Other Videos”
  3. Isn’t ignored.

Do you agree with me now testing:

/volume1/
  Media/
    .plexignore
    Other Videos/    <- attach point for 'Other Videos' library section
    Movies/          <- attach point for "Movies" library section

The .plexignore should prevent anything in Other Videos from being detected.

Correct ?

My actual folder layout is:

/volume1/
  media/  <- attach point for "TV Shows" library section
    .plexignore
    #recycle/    <- synology recycle bin
    #snapshot/     <- synology snapshot folder
    Other Videos/    <- attach point for 'Other Videos' library section
    Some/
    Other/
    Folders/

.plexignore (or the built-in ignore list) sould prevent anything in Other Videos, #recycle, #snapshot from being detected by the TV Shows library.

The Other Videos library is behaving as expected and picking up everything in the folder as the .plexignore is on the same level as the attach point and so doesn’t get processed.

Sorry if this is a confusing mess :slight_smile:

I don’t think that’s how it works (or it’s supposed to)! This seems to confirm how I know it.

https://support.plex.tv/articles/201381883-special-keyword-file-folder-exclusion/

If you add the “.plexignore” file to the root (top-level) folder in the content location, the ignore rules will apply to all sub-folders.

The “root (top-level) folder in the content location” is the attach point.

If I place this:

/Media/
  .plexignore
  Movies/
  TV/
  Others/

… and attach to Movies, TV, and Others, then the .plexignore will never be encountered as it reads each of those three directories.

However, If I create

Media/
  Movies/
    .plexignore

Now anything in the Movies tree, which matches the template in .plexignore will be skipped. A good example would be to ignore all *.avi.

That’s how I understood it to work so based on this:

/volume1/
  media/  <- attach point for "TV Shows" library section
     .plexignore
     #recycle/    <- synology recycle bin
     #snapshot/     <- synology snapshot folder
     Other Videos/    <- attach point for 'Other Videos' library section
     Some/
     Other/
     Folders/

I would expect the .plexignore to be read and obeyed for the TV Shows library and not for the Other Videos library, which is what happens except when it’s an ad-hoc scan based on new files being added.

I appreciate the having the Other Videos attach point being a subfolder of the TV Shows library is probably not a great idea, and I could ultimately move it, but I’m seeing the same behaviour for the #recycle folder (and I would presume the #snapshot folder but I don’t have scheduled snapshots at the moment so there’s nothing to be picked up).

Why do you have an Other Videos library type NESTED under a TV Shows type library?
That is going to cause all kinds of problems.
You’re going to get all kinds of cross contamination

I have moved the Other Videos library to its own share and removed the folder entirely from the media share.

I’m still seeing the same behaviour with the #recycle folder under the media share as before though:

image

If you still see #recycle then something is pointing to it
-or-

Scan , Empty Trash, and Clean Bundles is needed after you physically delete from the trash. Plex tracked the files to the recycle bin due to the structuring problem.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.