mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #11037] Add ability to enable/disable libraries #12706
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/11037
State: closed
Merged: Yes
This change addresses users desires to have the option to disable particular libraries for all users at certain times. This is handy for seasonal libraries (like christmas movies/music/tv shows).
I added a "Disabled" option to LibraryOptions.cs and a check to see if a library is disabled in CollectionFolder.cs (it overrides Folder's IsVisible function).
I chose "disabled" over "enabled" because the default value for booleans loaded into the LibraryOptions class by the JsonDeserializer is false, so by default, existing libraries will remain enabled.
I also made a corresponding checkbox in the jellyfin-web repository.
This commit addresses the issue described here:
https://features.jellyfin.org/posts/2530/hide-a-library-from-all-users-disable-library
MediaBrowser.Controller/Entities/CollectionFolder.cs - Added override to IsVisible to check if the library is disabled
MediaBrowser.Model/Configuration/LibraryOptions.cs - Added "Disabled" as an option for libraries.