diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-04-05 12:45:01 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-04-05 12:45:01 -0400 |
| commit | 961f48f5bcc8e4f1e0c3ac5e3c2757bbd14b6a9d (patch) | |
| tree | a68d6012dc26026b589187d2c54adaf854522ed7 /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | 6a3f9253db8b7886e020d84ed82d9ad45f3d3350 (diff) | |
Use ? and ?? where applicable
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 5029ce0bb..6e923768a 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -248,14 +248,8 @@ namespace MediaBrowser.Api.Playback if (state.VideoRequest != null && string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)) { - if (string.Equals(state.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase)) - { - logFilePrefix = "ffmpeg-remux"; - } - else - { - logFilePrefix = "ffmpeg-directstream"; - } + logFilePrefix = string.Equals(state.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase) + ? "ffmpeg-remux" : "ffmpeg-directstream"; } var logFilePath = Path.Combine(ServerConfigurationManager.ApplicationPaths.LogDirectoryPath, logFilePrefix + "-" + Guid.NewGuid() + ".txt"); @@ -862,14 +856,7 @@ namespace MediaBrowser.Api.Playback { var caps = DeviceManager.GetCapabilities(state.Request.DeviceId); - if (caps != null) - { - state.DeviceProfile = caps.DeviceProfile; - } - else - { - state.DeviceProfile = DlnaManager.GetProfile(headers); - } + state.DeviceProfile = caps != null ? caps.DeviceProfile : DlnaManager.GetProfile(headers); } } |
