aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.md1
-rw-r--r--MediaBrowser.Controller/Entities/CollectionFolder.cs11
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs2
3 files changed, 14 insertions, 0 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 55642e4e2..e9c0fb2ad 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 992bb19bb..676a47c88 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 42148a276..e777d5fd8 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; }