From 1af1c72e81c3100c5db1a58d853818910c125c10 Mon Sep 17 00:00:00 2001 From: martenumberto Date: Sun, 28 Dec 2025 07:22:18 -0500 Subject: [PATCH] Backport pull request #15690 from jellyfin/release-10.11.z Fix: Add .ts fallback for video streams to prevent crash Original-merge: 2a0b90e3852edae22d9f7cec197e6e81e9415632 Merged-by: crobibero Backported-by: Bond_009 --- CONTRIBUTORS.md | 1 + Jellyfin.Api/Helpers/StreamingHelpers.cs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 43954c0837..0fd509f842 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -208,6 +208,7 @@ - [GeneMarks](https://github.com/GeneMarks) - [Kirill Nikiforov](https://github.com/allmazz) - [bjorntp](https://github.com/bjorntp) + - [martenumberto](https://github.com/martenumberto) # Emby Contributors diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs index 2601fa3be8..b3f5b9a801 100644 --- a/Jellyfin.Api/Helpers/StreamingHelpers.cs +++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs @@ -159,6 +159,13 @@ public static class StreamingHelpers string? containerInternal = Path.GetExtension(state.RequestedUrl); + if (string.IsNullOrEmpty(containerInternal) + && (!string.IsNullOrWhiteSpace(streamingRequest.LiveStreamId) + || (mediaSource != null && mediaSource.IsInfiniteStream))) + { + containerInternal = ".ts"; + } + if (!string.IsNullOrEmpty(streamingRequest.Container)) { containerInternal = streamingRequest.Container;