mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Enable nullable for Jellyfin.Data and remove unnecessary attributes
This commit is contained in:
@@ -86,7 +86,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
|
||||
return name;
|
||||
}
|
||||
|
||||
private static string? GetPlaybackNotificationType(string mediaType)
|
||||
private static string GetPlaybackNotificationType(string mediaType)
|
||||
{
|
||||
if (string.Equals(mediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
|
||||
return NotificationType.VideoPlayback.ToString();
|
||||
}
|
||||
|
||||
return null;
|
||||
return "Playback";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ namespace Jellyfin.Server.Implementations.Users
|
||||
|
||||
var user = new User(
|
||||
name,
|
||||
_defaultAuthenticationProvider.GetType().FullName,
|
||||
_defaultPasswordResetProvider.GetType().FullName)
|
||||
_defaultAuthenticationProvider.GetType().FullName!,
|
||||
_defaultPasswordResetProvider.GetType().FullName!)
|
||||
{
|
||||
InternalId = max + 1
|
||||
};
|
||||
@@ -444,7 +444,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||
{
|
||||
var providerId = authenticationProvider.GetType().FullName;
|
||||
|
||||
if (!string.Equals(providerId, user.AuthenticationProviderId, StringComparison.OrdinalIgnoreCase))
|
||||
if (providerId != null && !string.Equals(providerId, user.AuthenticationProviderId, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
user.AuthenticationProviderId = providerId;
|
||||
await UpdateUserAsync(user).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user