autoscan icon indicating copy to clipboard operation
autoscan copied to clipboard

Failure to exclude paths from inotify

Open foux opened this issue 2 years ago • 2 comments

Hello,

I've got an issue with excluded folders from the IO trigger.

This used to be my trigger definition :

inotify:
    - priority: 0
      verbosity: 2
      include:
        - ^/mnt/user/medias/Movies
        - ^/mnt/user/medias/TV\ Shows
        - ^/mnt/user/medias/Music
      paths:
      - path: /datas/medias
      rewrite:
        - from: /datas/medias
          to: /mnt/user/medias

As I understood it, it should have sufficed, as I've got no problematic folders in my include. Nevertheless, rom time to time I've got the error : ERR Failed watching new directory error="watch directory: /datas/medias/Downloads/nzb/completed/......, while this folder is not supposed to be watched.

Nevermind, I added the excludes explicitely (I've added both the local path and the rewritten path to be sure, even though the rewritten path should have been sufficient) :

inotify:
    - priority: 0
      verbosity: 2
      include:
        - ^/mnt/user/medias/Movies
        - ^/mnt/user/medias/TV\ Shows
        - ^/mnt/user/medias/Music
      exclude:
        - ^/mnt/user/medias/Downloads
        - ^/datas/medias/Downloads
      paths:
      - path: /datas/medias
      rewrite:
        - from: /datas/medias
          to: /mnt/user/medias

But, then again, from time to time : ERR Failed watching new directory error="watch directory: /datas/medias/Downloads/nzb/completed/...

I understand why Autoscan can't watch this folder, as folders and files are being quickly created/deleted, as it's an nzb download folder. What I don't get is why this directory is being watched, when it is not in my included paths, and more than that it is specificaly in my excluded paths.

Thanks!

foux avatar Feb 25 '22 14:02 foux

I believe the paths will always be watched, the excludes just means to ignore inotify triggers from said paths. So you can add 3 paths (/data/medias/Movies, /data/medias/TV Shows, etc.) and this should avoid it watching downloads.

edrock200 avatar Mar 29 '22 18:03 edrock200

could probably just provide the library paths in a list under paths:

inotify:
  - priority: 0
      verbosity: 2
      include:
        - ^/mnt/user/medias/Movies
        - ^/mnt/user/medias/TV\ Shows
        - ^/mnt/user/medias/Music
      exclude:
        - ^/mnt/user/medias/Downloads
        - ^/datas/medias/Downloads
      paths:
        - path: /datas/medias/Movies
        - path: /datas/medias/TV\ Shows
        - path: /datas/medias/Music
      rewrite:
        - from: /datas/medias
          to: /mnt/user/medias

saltydk avatar May 27 '22 17:05 saltydk