Description
Describe the bug
Changing the filenames or path of some items added in a collection results in "orphaned" items in the collection. This error is represented in the logs at Warning level like this:
[WRN] Unable to find linked item at path path/to/the/original/file
To Reproduce
- Add items to a collection
- Change the path or name of those items in your filesystem
- Do an scan. Items will be automatically identified if you didn't change the name schema in a way that isn't recognizable by Jellyfin. If that's the case, Jellyfin will add the items to the original collection again.
- Reboot the server and scan again (optional, but to make sure that Jellyfin is fully "aware" of the change)
- See the logs after that last scan and grep with the filename of the old file: You will see that, although it handled the filename change gracefully in the first scan, it's still expecting the old file to be there, as that error just keeps spawning.
No matter how many library scans you do afterwards, those files will be stuck forever and Jellyfin will always be expecting them, although the user interface in all apps show the collection pointing to the new path correctly.
Expected behavior
Jellyfin forgets everything about all the old files in collections
System (please complete the following information):
- OS: Debian Buster in Raspberry Pi
- Jellyfin Version: [e.g. 10.4.0]
- Reverse proxy: nginx
Additional context
I haven't tested this, but I think that probably this is happening if you just remove an item from the filesystem, as Jellyfin, when a file is altered/moved from the filesystem, removes it and adds it again.
Activity