mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 21:38:27 +01:00
Enable nullabe reference types for MediaBrowser.Model
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@@ -14,63 +15,53 @@ namespace MediaBrowser.Model.Notifications
|
||||
{
|
||||
Options = new[]
|
||||
{
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.TaskFailed.ToString())
|
||||
{
|
||||
Type = NotificationType.TaskFailed.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.ServerRestartRequired.ToString())
|
||||
{
|
||||
Type = NotificationType.ServerRestartRequired.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.ApplicationUpdateAvailable.ToString())
|
||||
{
|
||||
Type = NotificationType.ApplicationUpdateAvailable.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.ApplicationUpdateInstalled.ToString())
|
||||
{
|
||||
Type = NotificationType.ApplicationUpdateInstalled.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.PluginUpdateInstalled.ToString())
|
||||
{
|
||||
Type = NotificationType.PluginUpdateInstalled.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.PluginUninstalled.ToString())
|
||||
{
|
||||
Type = NotificationType.PluginUninstalled.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.InstallationFailed.ToString())
|
||||
{
|
||||
Type = NotificationType.InstallationFailed.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.PluginInstalled.ToString())
|
||||
{
|
||||
Type = NotificationType.PluginInstalled.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.PluginError.ToString())
|
||||
{
|
||||
Type = NotificationType.PluginError.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
},
|
||||
new NotificationOption
|
||||
new NotificationOption(NotificationType.UserLockedOut.ToString())
|
||||
{
|
||||
Type = NotificationType.UserLockedOut.ToString(),
|
||||
Enabled = true,
|
||||
SendToUserMode = SendToUserType.Admins
|
||||
}
|
||||
@@ -81,8 +72,12 @@ namespace MediaBrowser.Model.Notifications
|
||||
{
|
||||
foreach (NotificationOption i in Options)
|
||||
{
|
||||
if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) return i;
|
||||
if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user