diff options
| author | Cody Robibero <cody@robibe.ro> | 2024-07-18 08:12:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-18 08:12:20 -0400 |
| commit | 4239de1ee78ee5e739c926918fca75f2ced8c1b4 (patch) | |
| tree | e7574543c5f500b9ca30199a6241bd5aaf44e819 /Jellyfin.Api/Helpers/DynamicHlsHelper.cs | |
| parent | 5262439300884680b1425b94de9c2f9c898d83ae (diff) | |
| parent | 59c18a7454074b3c2b7c67e0dc4071e3ffc5d704 (diff) | |
Merge pull request #11399 from jellyfin/audio-remux
Diffstat (limited to 'Jellyfin.Api/Helpers/DynamicHlsHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/DynamicHlsHelper.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs index b3878a41e..6f040cfae 100644 --- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs +++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs @@ -151,6 +151,14 @@ public class DynamicHlsHelper var queryString = _httpContextAccessor.HttpContext.Request.QueryString.ToString(); + // from universal audio service, need to override the AudioCodec when the actual request differs from original query + if (!string.Equals(state.OutputAudioCodec, _httpContextAccessor.HttpContext.Request.Query["AudioCodec"].ToString(), StringComparison.OrdinalIgnoreCase)) + { + var newQuery = Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(_httpContextAccessor.HttpContext.Request.QueryString.ToString()); + newQuery["AudioCodec"] = state.OutputAudioCodec; + queryString = Microsoft.AspNetCore.WebUtilities.QueryHelpers.AddQueryString(string.Empty, newQuery); + } + // from universal audio service if (!string.IsNullOrWhiteSpace(state.Request.SegmentContainer) && !queryString.Contains("SegmentContainer", StringComparison.OrdinalIgnoreCase)) |
