diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-02-28 10:12:14 +0000 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-02-28 10:12:14 +0000 |
| commit | 80ca3da55c7d8ec9cf06a619fc895c1e427c45ff (patch) | |
| tree | 95f5ddce05f6ede680b815cfe5dbf413ce6fb352 /MediaBrowser.Model/Notifications/NotificationOptions.cs | |
| parent | 1d6f489f17919e557987b2616048dc8def790f43 (diff) | |
| parent | f8c9c37c29efa6d42b79d6db3aa8a69a60106765 (diff) | |
Merge remote-tracking branch 'upstream/master' into FixFor5280Part2
Diffstat (limited to 'MediaBrowser.Model/Notifications/NotificationOptions.cs')
| -rw-r--r-- | MediaBrowser.Model/Notifications/NotificationOptions.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index 239a3777e..94bb5d6e3 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -2,18 +2,16 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Enums; -using MediaBrowser.Model.Extensions; using System.Linq; using Jellyfin.Data.Entities; +using Jellyfin.Data.Enums; +using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Users; namespace MediaBrowser.Model.Notifications { public class NotificationOptions { - public NotificationOption[] Options { get; set; } - public NotificationOptions() { Options = new[] @@ -71,6 +69,8 @@ namespace MediaBrowser.Model.Notifications }; } + public NotificationOption[] Options { get; set; } + public NotificationOption GetOptions(string type) { foreach (NotificationOption i in Options) @@ -104,7 +104,7 @@ namespace MediaBrowser.Model.Notifications NotificationOption opt = GetOptions(type); return opt != null && opt.Enabled && - !opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase); + !opt.DisabledMonitorUsers.Contains(userId.ToString(string.Empty), StringComparer.OrdinalIgnoreCase); } public bool IsEnabledToSendToUser(string type, string userId, User user) |
