2025-12-19, 10:33 PM
Bug report generated by Claude:
Bug Report: Library scan not discovering new symlinked folders
Jellyfin Version: 10.11.5
Environment:
- Ubuntu 22.04.5 LTS
- x64 architecture
- SQLite database with Optimistic locking
- Media stored on network storage (Ceph), accessed via symlinks on local ext4 filesystem
Problem Description:
Library scans are not discovering new symlinked folders. The scan only refreshes existing database entries but does not enumerate the filesystem to find new content.
Timeline:
- Last successfully added series: November 27, 2025
- 95+ symlinks created after this date exist on disk but are NOT in the database
- All scans since then have failed to discover these new folders
What I've verified:
- All symlinks are valid and accessible
- The jellyfin user has read permissions to all symlinks and their targets
- sudo -u jellyfin ls "/path/to/symlinked/folder/" works correctly
- inotify limits are sufficient (max_user_watches: 4194304)
- Library configuration is correct with single path entry
- EnableRealtimeMonitor is true
Reproduction steps:
1. Have a TV library pointing to a directory containing symlinks to network storage
2. Create new symlinks in that directory
3. Run a library scan
4. New symlinks are not discovered or added to the database
Additional observation:
When I manually insert database entries for the missing symlinked series using SQL, Jellyfin removes them during the "Validating media library" phase at startup. The log shows:
[INF] Validating media library
[INF] Removing item, Type: Series, Name: [Series Name], Path: /path/to/symlink, Id: [uuid]
This suggests the validation code also cannot "see" the symlinks, even though they are valid and readable.
Expected behavior:
Library scan should enumerate all folders (including symlinks) in the library path and add new ones to the database.
Actual behavior:
Library scan only iterates over existing database entries. New symlinked folders are never discovered, and manually-added entries are removed during validation.
Logs showing the issue:
During scan, I see "Running enqueue of items in library [Library Name]" but no new series are added. The scan proceeds to refresh existing items only.
At startup, "Validating media library" removes entries for valid symlinks:
[INF] Stopping directory watching for path /media/TV
[INF] Validating media library
[INF] Removing item, Type: Series, Name: [Show1], Path: /media/TV/[Show1]
[INF] Removing item, Type: Series, Name: [Show2], Path: /media/TV/[Show2]
...
Workarounds attempted:
- Creating a new library pointing to the same path - shares same folder entry, doesn't help
- Multiple server restarts
- Multiple library scans
- Manual SQL insertion (entries get removed by validation)
Bug Report: Library scan not discovering new symlinked folders
Jellyfin Version: 10.11.5
Environment:
- Ubuntu 22.04.5 LTS
- x64 architecture
- SQLite database with Optimistic locking
- Media stored on network storage (Ceph), accessed via symlinks on local ext4 filesystem
Problem Description:
Library scans are not discovering new symlinked folders. The scan only refreshes existing database entries but does not enumerate the filesystem to find new content.
Timeline:
- Last successfully added series: November 27, 2025
- 95+ symlinks created after this date exist on disk but are NOT in the database
- All scans since then have failed to discover these new folders
What I've verified:
- All symlinks are valid and accessible
- The jellyfin user has read permissions to all symlinks and their targets
- sudo -u jellyfin ls "/path/to/symlinked/folder/" works correctly
- inotify limits are sufficient (max_user_watches: 4194304)
- Library configuration is correct with single path entry
- EnableRealtimeMonitor is true
Reproduction steps:
1. Have a TV library pointing to a directory containing symlinks to network storage
2. Create new symlinks in that directory
3. Run a library scan
4. New symlinks are not discovered or added to the database
Additional observation:
When I manually insert database entries for the missing symlinked series using SQL, Jellyfin removes them during the "Validating media library" phase at startup. The log shows:
[INF] Validating media library
[INF] Removing item, Type: Series, Name: [Series Name], Path: /path/to/symlink, Id: [uuid]
This suggests the validation code also cannot "see" the symlinks, even though they are valid and readable.
Expected behavior:
Library scan should enumerate all folders (including symlinks) in the library path and add new ones to the database.
Actual behavior:
Library scan only iterates over existing database entries. New symlinked folders are never discovered, and manually-added entries are removed during validation.
Logs showing the issue:
During scan, I see "Running enqueue of items in library [Library Name]" but no new series are added. The scan proceeds to refresh existing items only.
At startup, "Validating media library" removes entries for valid symlinks:
[INF] Stopping directory watching for path /media/TV
[INF] Validating media library
[INF] Removing item, Type: Series, Name: [Show1], Path: /media/TV/[Show1]
[INF] Removing item, Type: Series, Name: [Show2], Path: /media/TV/[Show2]
...
Workarounds attempted:
- Creating a new library pointing to the same path - shares same folder entry, doesn't help
- Multiple server restarts
- Multiple library scans
- Manual SQL insertion (entries get removed by validation)
