Jellyfin Forum
SOLVED: Real time monitoring not working on some libraries - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Real time monitoring not working on some libraries (/t-solved-real-time-monitoring-not-working-on-some-libraries)



Real time monitoring not working on some libraries - kandykarter - 2024-12-02

I have a small issue with media scanning that doesn't make a lot of sense to me. In my primary three libraries (Music, TV, Movies) real-time monitoring works quite well, a couple minutes after my automation software moves something into the library it appears in Jellyfin.

Recently however, I created two new libraries where my users can use Jellyseer to request things that I'm not interested in having in the primary/personal libraries. Those libraries are called "TV - Requests" and "Movies - Requests", and are set up to contain shows and movies respectively. Both libraries have real-time monitoring enabled, but when new movies or shows are added, I need to rescan the libraries manually to get them to show up. This makes very little sense to me as the request libraries are subdirectories of the same /media folder that the other libraries are in (for example, the correctly-working Movies library is /data/media/Movies and the dysfunctional "Movies - Requests" library is /data/media/Movies-Requests).

Does Jellyfin glitch out if it has more than one of a specific type of library, or am I doing something wrong?

Thanks for any help.


RE: Real time monitoring not working on some libraries - TheDreadPirate - 2024-12-02

Is that directory on a locally attached hard drive or on a network share?


RE: Real time monitoring not working on some libraries - kandykarter - 2024-12-03

It's a network share, mounted in fstab by CIFS. Which I know is often janky, and maybe that's what this is and there's nothing I can do.

But like, they're _all_ on that network share. Why does real time monitoring work on 3 of 5 subdirectories of the same folder? The Movies file does real-time monitoring perfectly, and Movies-requests which is literally right next to it doesn't?


RE: Real time monitoring not working on some libraries - schnappi - 2024-12-03

inotify does not work with CIF mounted drives.

https://lists.samba.org/archive/linux-cifs-client/2009-April/004319.html

Below may be a workaround:

https://github.com/clarabstract/watchntouch


RE: Real time monitoring not working on some libraries - kandykarter - 2024-12-03

(2024-12-03, 12:14 AM)schnappi Wrote: inotify does not work with CIF mounted drives.

But like.. it *does* work in my main three libraries? How does Jellyfin suddenly know there's new files in those folders if inotify isn't telling it?


RE: Real time monitoring not working on some libraries - TheDreadPirate - 2024-12-03

Is it adding files in real time? There is a scheduled tasks to scan your libraries twice a day.

I found some newer threads that appears to indicate that while inotify doesn't work the same on network shares, there is SOME level of real time monitoring for CIFS. But there are configurable limits.

https://community.spiceworks.com/t/inotifywait-doesnt-work-on-network-share/953436


RE: Real time monitoring not working on some libraries - kandykarter - 2024-12-03

It definitely does happen in real-time, generally within 2 minutes of adding files, my Music, TV, and Movies libraries all update. For some reason my secondary libraries don't, despite being subfolders of the same bind mount as the main libraries.

If CIFS & real-time monitoring are just total witchcraft I can live with that, I was just wondering if I were doing something wrong.

[EDIT: If anyone has this problem in the future, I found that my bind mounts were oddly the issue? I had a second bind mount in my docker compose for the "Requests" folder, and I've changed from that to mounting the parent folder and adjusting the path in Jellyfin, now it pays attention to all my libraries. Still not sure WHY inotify works on my CIFS mounts, but not gonna look a gift horse in the mouth]