Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Switch from inotify to alternative for CIFS shares #3469

Open
KaiStarkk opened this issue Sep 29, 2024 · 3 comments
Open

[Enhancement]: Switch from inotify to alternative for CIFS shares #3469

KaiStarkk opened this issue Sep 29, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@KaiStarkk
Copy link

KaiStarkk commented Sep 29, 2024

Type of Enhancement

Server Backend

Describe the Feature/Enhancement

CIFS mounts apparently aren't able to detect SMB2+ change_notify events for Linux clients.
Incidentally, this is not the case for Windows clients using ReadDirectoryChangesW.

For this reason, it would be nice to have a polling alternative for Linux (or docker) clients such as:

I could be wrong, but it appears that the built in scanner is more resource intensive and slow than above tools which would be based on stat. If I am wrong there this FR is redundant.

Why would this be helpful?

This would prevent having to manually scan libraries after books are added.

Future Implementation (Screenshot)

N/A

Audiobookshelf Server Version

v2.13.3

Current Implementation (Screenshot)

No response

@KaiStarkk KaiStarkk added the enhancement New feature or request label Sep 29, 2024
@advplyr
Copy link
Owner

advplyr commented Sep 29, 2024

Abs uses watcher to watch for file changes.

I'm not sure we want to add in polling due to how large some users libraries are. Keeping the record of and polling 100k+ files I can imagine being very expensive, especially over NFS. I would be curious how other media servers handle this.

We wouldn't use the libraries you shared because Abs is built with nodejs.

@mikiher
Copy link
Contributor

mikiher commented Sep 29, 2024

For the record, here's a discussion around this topic from an older bug.

@KaiStarkk
Copy link
Author

KaiStarkk commented Sep 30, 2024

Thanks @mikiher . I like the groundwork you've laid for a Windows watcher, I'll eventually do something similar for Linux hosts (which should also cover TrueNAS Scale) and maybe some of the BSD NAS OSs.

@advplyr One thing that would help a lot would be an API endpoint or payload in the scan endpoint to specify a directory to be scanned, rather than the whole library. That would make things much more responsive. I assume this is what the server already does internally when the watcher detects a change? Happy to look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants