From 5913db991bca9628d7147df688874adae428ad74 Mon Sep 17 00:00:00 2001 From: gnattu Date: Fri, 13 Sep 2024 22:46:36 +0800 Subject: [PATCH] Improve readability Signed-off-by: gnattu --- MediaBrowser.Model/Dlna/StreamBuilder.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 3354838c47..7789eac693 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -1419,7 +1419,7 @@ namespace MediaBrowser.Model.Dlna var failureReasons = analyzedProfiles[false] .Select(analysis => analysis.Result) - .Where(result => !containerSupported || (result.TranscodeReason & TranscodeReason.ContainerNotSupported) == 0) + .Where(result => !containerSupported || !result.TranscodeReason.HasFlag(TranscodeReason.ContainerNotSupported)) .Select(result => result.TranscodeReason) .ToList(); @@ -1429,8 +1429,8 @@ namespace MediaBrowser.Model.Dlna } else { - var videoCodecNotSupportedCount = failureReasons.Count(r => (r & TranscodeReason.VideoCodecNotSupported) != 0); - var audioCodecNotSupportedCount = failureReasons.Count(r => (r & TranscodeReason.AudioCodecNotSupported) != 0); + var videoCodecNotSupportedCount = failureReasons.Count(r => r.HasFlag(TranscodeReason.VideoCodecNotSupported)); + var audioCodecNotSupportedCount = failureReasons.Count(r => r.HasFlag(TranscodeReason.AudioCodecNotSupported)); if (!containerSupported) {