diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 55642e4e21..e9c0fb2ad7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -180,6 +180,7 @@ _ [Barasingha](https://github.com/MaVdbussche) - [Gauvino](https://github.com/Gauvino) - [felix920506](https://github.com/felix920506) + - [btopherjohnson](https://github.com/btopherjohnson) # Emby Contributors diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index 992bb19bb1..676a47c883 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -11,6 +11,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions.Json; using MediaBrowser.Controller.IO; @@ -95,6 +96,16 @@ namespace MediaBrowser.Controller.Entities return GetLibraryOptions(Path); } + public override bool IsVisible(User user) + { + if (GetLibraryOptions().Enabled) + { + return base.IsVisible(user); + } + + return false; + } + private static LibraryOptions LoadLibraryOptions(string path) { try diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index 42148a2761..e777d5fd88 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -27,6 +27,8 @@ namespace MediaBrowser.Model.Configuration SeasonZeroDisplayName = "Specials"; } + public bool Enabled { get; set; } = true; + public bool EnablePhotos { get; set; } public bool EnableRealtimeMonitor { get; set; }