Remove unnecessary null checks in some places
Related to https://github.com/jellyfin/jellyfin/issues/2149
This commit is contained in:
parent
c0be770681
commit
211c9cd608
|
@ -554,7 +554,7 @@ namespace Jellyfin.Api.Helpers
|
||||||
private long? GetMaxBitrate(long? clientMaxBitrate, User user, string ipAddress)
|
private long? GetMaxBitrate(long? clientMaxBitrate, User user, string ipAddress)
|
||||||
{
|
{
|
||||||
var maxBitrate = clientMaxBitrate;
|
var maxBitrate = clientMaxBitrate;
|
||||||
var remoteClientMaxBitrate = user?.RemoteClientBitrateLimit ?? 0;
|
var remoteClientMaxBitrate = user.RemoteClientBitrateLimit ?? 0;
|
||||||
|
|
||||||
if (remoteClientMaxBitrate <= 0)
|
if (remoteClientMaxBitrate <= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -740,10 +740,7 @@ namespace Jellyfin.Api.Helpers
|
||||||
/// <param name="state">The state.</param>
|
/// <param name="state">The state.</param>
|
||||||
private void OnFfMpegProcessExited(Process process, TranscodingJobDto job, StreamState state)
|
private void OnFfMpegProcessExited(Process process, TranscodingJobDto job, StreamState state)
|
||||||
{
|
{
|
||||||
if (job != null)
|
job.HasExited = true;
|
||||||
{
|
|
||||||
job.HasExited = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.LogDebug("Disposing stream resources");
|
_logger.LogDebug("Disposing stream resources");
|
||||||
state.Dispose();
|
state.Dispose();
|
||||||
|
|
|
@ -799,7 +799,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||||
|
|
||||||
private IList<IPasswordResetProvider> GetPasswordResetProviders(User user)
|
private IList<IPasswordResetProvider> GetPasswordResetProviders(User user)
|
||||||
{
|
{
|
||||||
var passwordResetProviderId = user?.PasswordResetProviderId;
|
var passwordResetProviderId = user.PasswordResetProviderId;
|
||||||
var providers = _passwordResetProviders.Where(i => i.IsEnabled).ToArray();
|
var providers = _passwordResetProviders.Where(i => i.IsEnabled).ToArray();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(passwordResetProviderId))
|
if (!string.IsNullOrEmpty(passwordResetProviderId))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user