Sfoglia il codice sorgente

add additional transcoding info

Luke Pulverenti 11 anni fa
parent
commit
6120286bfd

+ 4 - 1
MediaBrowser.Api/ApiEntryPoint.cs

@@ -176,7 +176,10 @@ namespace MediaBrowser.Api
                     VideoCodec = videoCodec,
                     Container = state.OutputContainer,
                     Framerate = framerate,
-                    CompletionPercentage = percentComplete
+                    CompletionPercentage = percentComplete,
+                    Width = state.OutputWidth,
+                    Height = state.OutputHeight,
+                    AudioChannels = state.OutputAudioChannels
                 });
             }
         }

+ 2 - 0
MediaBrowser.Api/Playback/BaseStreamingService.cs

@@ -1584,6 +1584,8 @@ namespace MediaBrowser.Api.Playback
 
             state.OutputAudioCodec = GetAudioCodec(state.Request);
 
+            state.OutputAudioChannels = GetNumAudioChannelsParam(state.Request, state.AudioStream, state.OutputAudioCodec);
+            
             if (videoRequest != null)
             {
                 state.OutputVideoCodec = GetVideoCodec(videoRequest);

+ 4 - 0
MediaBrowser.Model/Session/PlayerStateInfo.cs

@@ -66,5 +66,9 @@
 
         public float? Framerate { get; set; }
         public double? CompletionPercentage { get; set; }
+
+        public int? Width { get; set; }
+        public int? Height { get; set; }
+        public int? AudioChannels { get; set; }
     }
 }

+ 1 - 1
MediaBrowser.Server.Implementations/Session/SessionManager.cs

@@ -464,7 +464,7 @@ namespace MediaBrowser.Server.Implementations.Session
 
             UpdateNowPlayingItem(session, info, libraryItem);
 
-            if (!string.IsNullOrEmpty(session.DeviceId))
+            if (!string.IsNullOrEmpty(session.DeviceId) && info.PlayMethod != PlayMethod.Transcode)
             {
                 ClearTranscodingInfo(session.DeviceId);
             }