diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-02-20 23:13:04 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-02-20 23:29:33 +0100 |
| commit | 141efafd3dbbef3dc64824a89fd3fdc77da0b25e (patch) | |
| tree | 7087b9d58c87a9feb347670cb9eb78957e35af02 /MediaBrowser.Model/Notifications/NotificationOptions.cs | |
| parent | 13d65318eb36f3fc423d8060e0092c8671579ed0 (diff) | |
Enable TreatWarningsAsErrors for MediaBrowser.Model
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) |
