Regression on 10.6: Media files under a subtree of a hidden directory are excluded from the library scan #1933

Closed
opened 2025-12-21 19:43:43 +01:00 by backuprepo · 8 comments
Owner

Originally created by @faik-dev on GitHub (Jul 24, 2020).

Describe the bug
On version 10.6.0, the contents of the folders that are added to the library are not scanned if the folder itself or any of its parent tree is a hidden directory.

Example: A path like /opt/.library or /opt/.library/some-dir content won't be scanned, as opposed to a directory like /opt/library.

This causes part of the library to disappear after upgrading to 10.6.

System (please complete the following information):

  • OS: Ubuntu 18.04
  • Virtualization: None
  • Clients: Web
  • Browser: Google Chrome
  • Jellyfin Version: 10.6.0
  • Playback: All types
  • Installed Plugins: None
  • Reverse Proxy: Nginx
  • Base URL: None
  • Networking: Host
  • Storage: Local

To Reproduce

  1. Go to Admin - Dashboard - Libraries
  2. Add a new library called A with type "Photos" with a folder /opt/.a
  3. Add a new library called B with type "Photos" with a folder /opt/.b/x
  4. Add a new library called C with type "Photos" with a folder /opt/c
  5. Put some media files under all the directories mentioned above.
  6. Trigger a scan on all libraries A, B and C.
  7. Observe that only library C detects and adds the files.

(Follow the same steps on version 10.5.5 to see that all libraries are scanned correctly)

Expected behavior
The files under hidden directories are also scanned and added to the library.

Originally created by @faik-dev on GitHub (Jul 24, 2020). **Describe the bug** On version 10.6.0, the contents of the folders that are added to the library are not scanned if the folder itself or any of its parent tree is a hidden directory. Example: A path like `/opt/.library` or `/opt/.library/some-dir` content won't be scanned, as opposed to a directory like `/opt/library`. This causes part of the library to disappear after upgrading to 10.6. **System (please complete the following information):** - OS: Ubuntu 18.04 - Virtualization: None - Clients: Web - Browser: Google Chrome - Jellyfin Version: 10.6.0 - Playback: All types - Installed Plugins: None - Reverse Proxy: Nginx - Base URL: None - Networking: Host - Storage: Local **To Reproduce** 1. Go to Admin - Dashboard - Libraries 2. Add a new library called A with type "Photos" with a folder `/opt/.a` 2. Add a new library called B with type "Photos" with a folder `/opt/.b/x` 4. Add a new library called C with type "Photos" with a folder `/opt/c` 5. Put some media files under all the directories mentioned above. 6. Trigger a scan on all libraries A, B and C. 7. Observe that only library C detects and adds the files. (Follow the same steps on version 10.5.5 to see that all libraries are scanned correctly) **Expected behavior** The files under hidden directories are also scanned and added to the library.
backuprepo 2025-12-21 19:43:43 +01:00
Author
Owner

@Shadowghost commented on GitHub (Jul 24, 2020):

If this ever woked it shouldn't have at all.
Directories starting with . or with a .ignore file within them will be omitted on scan. We inherited this behaviour.

@Shadowghost commented on GitHub (Jul 24, 2020): If this ever woked it shouldn't have at all. Directories starting with `.` or with a `.ignore` file within them will be omitted on scan. We [inherited this behaviour](https://support.emby.media/support/solutions/articles/44001159118-excluding-files-folders).
Author
Owner

@faik-dev commented on GitHub (Jul 24, 2020):

I see. Still I think this might count as a regression, because it results in media disappearing from users' libraries after the upgrade.

Maybe adding a feature to optionally include hidden directories via a checkbox like "Include hidden directories" on library settings is a good idea, so that users can enable it to bring their media back without moving files on the filesystem.

If you'd agree, I can create a feature request for it (not sure if I could find time to implement it though).

@faik-dev commented on GitHub (Jul 24, 2020): I see. Still I think this might count as a regression, because it results in media disappearing from users' libraries after the upgrade. Maybe adding a feature to optionally include hidden directories via a checkbox like "Include hidden directories" on library settings is a good idea, so that users can enable it to bring their media back without moving files on the filesystem. If you'd agree, I can create a feature request for it (not sure if I could find time to implement it though).
Author
Owner

@aaruni96 commented on GitHub (Jul 25, 2020):

I think this also explains my issue https://github.com/jellyfin/jellyfin/issues/3651 .

Everything which disappeared was under a dot directory.

/media/aaruni/externalHDD/.jellyfin/TV/

@aaruni96 commented on GitHub (Jul 25, 2020): I think this also explains my issue https://github.com/jellyfin/jellyfin/issues/3651 . Everything which disappeared was under a dot directory. `/media/aaruni/externalHDD/.jellyfin/TV/`
Author
Owner

@faik-dev commented on GitHub (Jul 25, 2020):

Tbh I think this need fixing, because it seems like using hidden folders was a common use case.

Especially considering the fact that it does not only ignore the hidden directories in the subtree, it also ignores the files if one of the directories in the parent tree is hidden.

Example:
If we define /opt/.a/b/ as a library folder, it won't only exclude, say /opt/.a/b/.c, it will exclude everything, including /opt/.a/b/d, /opt/.a/b/e and so on - because there's .a in the parent tree.

Imo Jellyfin should at least be agnostic to the parent directory tree - it has nothing to do with it.

@faik-dev commented on GitHub (Jul 25, 2020): Tbh I think this need fixing, because it seems like using hidden folders was a common use case. Especially considering the fact that it does not only ignore the hidden directories in the subtree, it also ignores the files if one of the directories in the parent tree is hidden. Example: If we define `/opt/.a/b/` as a library folder, it won't only exclude, say `/opt/.a/b/.c`, it will exclude **everything**, including `/opt/.a/b/d`, `/opt/.a/b/e` and so on - because there's `.a` in the parent tree. Imo Jellyfin should at least be agnostic to the parent directory tree - it has nothing to do with it.
Author
Owner

@oddstr13 commented on GitHub (Jul 25, 2020):

This is caused by #3099 (**/.*/**)

While the pattern added in #3456 is similar (**/.*), it is most likely fine to ignore all dotfiles. If not, mac specific ignores need to be added.

@oddstr13 commented on GitHub (Jul 25, 2020): This is caused by #3099 (`**/.*/**`) While the pattern added in #3456 is similar (`**/.*`), it is most likely fine to ignore all dotfiles. If not, mac specific ignores need to be added.
Author
Owner

@aaruni96 commented on GitHub (Jul 26, 2020):

Temporary workaround : symlink a file structure without dotfolders to media location.

/home/jellyfin/usb/TV -> /media/usb/.jellyfin/TV

@aaruni96 commented on GitHub (Jul 26, 2020): Temporary workaround : symlink a file structure without dotfolders to media location. /home/jellyfin/usb/TV -> /media/usb/.jellyfin/TV
Author
Owner

@TKFRvisionOfficial commented on GitHub (Feb 9, 2021):

This issue is back on 10.7.0 rc3...

@TKFRvisionOfficial commented on GitHub (Feb 9, 2021): This issue is back on 10.7.0 rc3...
Author
Owner

@crobibero commented on GitHub (Feb 9, 2021):

This issue is back on 10.7.0 rc3...

This was already reported and fixed in a different issue. https://github.com/jellyfin/jellyfin/issues/5135

@crobibero commented on GitHub (Feb 9, 2021): > > > This issue is back on 10.7.0 rc3... This was already reported and fixed in a different issue. https://github.com/jellyfin/jellyfin/issues/5135
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#1933
No description provided.