mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
Jellyfin doesn't remove library items if their previously used directory is empty #6498
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alvitali on GitHub (Nov 20, 2024).
This issue respects the following points:
Description of the bug
When removing or moving all items from a library's folder, Jellyfin skips over the empty directory, leaving all the library items in the database after scanning the library. If items were moved to another folder, they all show up as duplicates, with one file unplayable as it doesn't exist at the specified path.
Reproduction steps
What is the current bug behavior?
On subsequent library scans, Jellyfin just skips scanning the empty directory. If the files were moved to another path in the same library, all the library items are duplicated - with one copy that's unplayable as those files do not exist where Jellyfin is looking for them.
What is the expected correct behavior?
Scan and update the library database regardless of whether a directory is empty or not. Maybe differentiate between empty (accessible) directories and unaccessible directories, so in case of lost connection to network shares the entire library isn't deleted.
Jellyfin Server version
10.10.0+
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.10.3
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
No response
Additional information
No response
@gnattu commented on GitHub (Nov 20, 2024):
This is a design choice and you can see the explanation here: https://github.com/jellyfin/jellyfin/issues/12297#issuecomment-2370111919
Closing as duplicated.