Remove conditional access when it is known to be not null

pull/10366/head
Stepan Goremykin 9 months ago
parent 526f9a825c
commit 47254d6a22

@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Net
} }
catch catch
{ {
socket?.Dispose(); socket.Dispose();
throw; throw;
} }
@ -55,7 +55,7 @@ namespace Emby.Server.Implementations.Net
} }
catch catch
{ {
socket?.Dispose(); socket.Dispose();
throw; throw;
} }
@ -97,7 +97,7 @@ namespace Emby.Server.Implementations.Net
} }
catch catch
{ {
socket?.Dispose(); socket.Dispose();
throw; throw;
} }

@ -294,8 +294,8 @@ public class LibraryController : BaseJellyfinApiController
return new AllThemeMediaResult return new AllThemeMediaResult
{ {
ThemeSongsResult = themeSongs?.Value, ThemeSongsResult = themeSongs.Value,
ThemeVideosResult = themeVideos?.Value, ThemeVideosResult = themeVideos.Value,
SoundtrackSongsResult = new ThemeMediaResult() SoundtrackSongsResult = new ThemeMediaResult()
}; };
} }
@ -490,7 +490,7 @@ public class LibraryController : BaseJellyfinApiController
baseItemDtos.Add(_dtoService.GetBaseItemDto(parent, dtoOptions, user)); baseItemDtos.Add(_dtoService.GetBaseItemDto(parent, dtoOptions, user));
parent = parent?.GetParent(); parent = parent.GetParent();
} }
return baseItemDtos; return baseItemDtos;

@ -1313,7 +1313,7 @@ namespace MediaBrowser.Model.Dlna
var audioFailureConditions = GetProfileConditionsForVideoAudio(profile.CodecProfiles, container, audioStream.Codec, audioStream.Channels, audioStream.BitRate, audioStream.SampleRate, audioStream.BitDepth, audioStream.Profile, mediaSource.IsSecondaryAudio(audioStream)); var audioFailureConditions = GetProfileConditionsForVideoAudio(profile.CodecProfiles, container, audioStream.Codec, audioStream.Channels, audioStream.BitRate, audioStream.SampleRate, audioStream.BitDepth, audioStream.Profile, mediaSource.IsSecondaryAudio(audioStream));
var audioStreamFailureReasons = AggregateFailureConditions(mediaSource, profile, "VideoAudioCodecProfile", audioFailureConditions); var audioStreamFailureReasons = AggregateFailureConditions(mediaSource, profile, "VideoAudioCodecProfile", audioFailureConditions);
if (audioStream?.IsExternal == true) if (audioStream.IsExternal == true)
{ {
audioStreamFailureReasons |= TranscodeReason.AudioIsExternal; audioStreamFailureReasons |= TranscodeReason.AudioIsExternal;
} }

Loading…
Cancel
Save