mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #10328] Add functionality to remove empty media folders on item delete #12436
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?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/10328
State: closed
Merged: No
Changes
Eempty media folders will be deleted when the last item is deleted. Eg. deleting the last episode from a season in a series would delete the season in the library and directory on disk. If that season was the last season for that series, the series would also be deleted from the library and disk.
Tested on Windows only, though I expect it should work for other operating systems.
Detection for existing files uses the same ignore list as media import to ensure standard hidden files are not mistaked for user files. If there are any remaning files that are not safe to ignore and do not belong to Jellyfin, the delete action for the folder will be skipped.
Issues
ex. Fixes #832