From cb7714a32e8c544cacbe11b7999cfd8932443d16 Mon Sep 17 00:00:00 2001 From: gnattu Date: Thu, 18 Jul 2024 17:49:44 +0800 Subject: [PATCH] Code cleanup Co-authored-by: Bond-009 --- Jellyfin.Api/Controllers/UniversalAudioController.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Api/Controllers/UniversalAudioController.cs b/Jellyfin.Api/Controllers/UniversalAudioController.cs index 3286105e3..4e287abcb 100644 --- a/Jellyfin.Api/Controllers/UniversalAudioController.cs +++ b/Jellyfin.Api/Controllers/UniversalAudioController.cs @@ -186,8 +186,12 @@ public class UniversalAudioController : BaseJellyfinApiController var supportedHlsContainers = new[] { "ts", "mp4" }; // fallback to mpegts if device reports some weird value unsupported by hls - var requestedSegmentContainer = Array.Exists(supportedHlsContainers, element => element == transcodingContainer) ? transcodingContainer : "ts"; - var segmentContainer = Array.Exists(supportedHlsContainers, element => element == mediaSource.TranscodingContainer) ? mediaSource.TranscodingContainer : requestedSegmentContainer; + var requestedSegmentContainer = Array.Exists( + supportedHlsContainers, + element => string.Equals(element, transcodingContainer, StringComparison.OrdinalIgnoreCase)) ? transcodingContainer : "ts"; + var segmentContainer = Array.Exists( + supportedHlsContainers, + element => string.Equals(element, mediaSource.TranscodingContainer, StringComparison.OrdinalIgnoreCase)) ? mediaSource.TranscodingContainer : requestedSegmentContainer; var dynamicHlsRequestDto = new HlsAudioRequestDto { Id = itemId,