소스 검색

Merge pull request #6907 from marius-luca-87/dlna

Cody Robibero 3 년 전
부모
커밋
976e3160b8
1개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 11 4
      MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs

+ 11 - 4
MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs

@@ -151,10 +151,12 @@ namespace MediaBrowser.Model.Dlna
                             DlnaFlags.InteractiveTransferMode |
                             DlnaFlags.DlnaV15;
 
-            // if (isDirectStream)
-            // {
-            //     flagValue = flagValue | DlnaFlags.ByteBasedSeek;
-            // }
+            if (isDirectStream)
+            {
+                flagValue |= DlnaFlags.ByteBasedSeek;
+            }
+
+            // Time based seek is curently disabled when streaming. On LG CX3 adding DlnaFlags.TimeBasedSeek and orgPn causes the DLNA playback to fail (format not supported). Further investigations are needed before enabling the remaining code paths.
             //  else if (runtimeTicks.HasValue)
             // {
             //     flagValue = flagValue | DlnaFlags.TimeBasedSeek;
@@ -209,6 +211,11 @@ namespace MediaBrowser.Model.Dlna
                 {
                     contentFeatureList.Add(orgOp.TrimStart(';') + orgCi + dlnaflags);
                 }
+                else if (isDirectStream)
+                {
+                    // orgOp should be added all the time once the time based seek is resolved for transcoded streams
+                    contentFeatureList.Add("DLNA.ORG_PN=" + orgPn + orgOp + orgCi + dlnaflags);
+                }
                 else
                 {
                     contentFeatureList.Add("DLNA.ORG_PN=" + orgPn + orgCi + dlnaflags);