瀏覽代碼

Fix: Add .ts fallback for video streams to prevent crash (#15690)

martenumberto 1 周之前
父節點
當前提交
2a0b90e385
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 1 0
      CONTRIBUTORS.md
  2. 7 0
      Jellyfin.Api/Helpers/StreamingHelpers.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -205,6 +205,7 @@
  - [theshoeshiner](https://github.com/theshoeshiner)
  - [TokerX](https://github.com/TokerX)
  - [GeneMarks](https://github.com/GeneMarks)
+ - [martenumberto](https://github.com/martenumberto)
 
 # Emby Contributors
 

+ 7 - 0
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;