diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2021-02-22 21:00:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-22 21:00:46 -0500 |
| commit | 7ece3c552337340a997a75aab1520a501a673f61 (patch) | |
| tree | 4bb865830c06de487d65706959b5df2b47fc14e1 /MediaBrowser.Model/Notifications/NotificationOptions.cs | |
| parent | c0c4aff8a642013ec406c065c8374aaad8b4ef65 (diff) | |
| parent | 003945f25b8d19de4638789bf0cdf580c546c9dd (diff) | |
Merge pull request #5273 from Bond-009/warn31
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) |
