Luke Pulverenti 8 gadi atpakaļ
vecāks
revīzija
9da48106c8
1 mainītis faili ar 12 papildinājumiem un 10 dzēšanām
  1. 12 10
      MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

+ 12 - 10
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

@@ -533,8 +533,10 @@ namespace MediaBrowser.MediaEncoding.Encoder
             probeSize = probeSize + " " + analyzeDuration;
             probeSize = probeSize + " " + analyzeDuration;
             probeSize = probeSize.Trim();
             probeSize = probeSize.Trim();
 
 
+            var forceEnableLogging = request.Protocol != MediaProtocol.File;
+
             return GetMediaInfoInternal(GetInputArgument(inputFiles, request.Protocol), request.InputPath, request.Protocol, extractChapters,
             return GetMediaInfoInternal(GetInputArgument(inputFiles, request.Protocol), request.InputPath, request.Protocol, extractChapters,
-                probeSize, request.MediaType == DlnaProfileType.Audio, request.VideoType, cancellationToken);
+                probeSize, request.MediaType == DlnaProfileType.Audio, request.VideoType, forceEnableLogging, cancellationToken);
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -577,14 +579,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
         /// <summary>
         /// <summary>
         /// Gets the media info internal.
         /// Gets the media info internal.
         /// </summary>
         /// </summary>
-        /// <param name="inputPath">The input path.</param>
-        /// <param name="primaryPath">The primary path.</param>
-        /// <param name="protocol">The protocol.</param>
-        /// <param name="extractChapters">if set to <c>true</c> [extract chapters].</param>
-        /// <param name="probeSizeArgument">The probe size argument.</param>
-        /// <param name="isAudio">if set to <c>true</c> [is audio].</param>
-        /// <param name="videoType">Type of the video.</param>
-        /// <param name="cancellationToken">The cancellation token.</param>
         /// <returns>Task{MediaInfoResult}.</returns>
         /// <returns>Task{MediaInfoResult}.</returns>
         private async Task<MediaInfo> GetMediaInfoInternal(string inputPath,
         private async Task<MediaInfo> GetMediaInfoInternal(string inputPath,
             string primaryPath,
             string primaryPath,
@@ -593,6 +587,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
             string probeSizeArgument,
             string probeSizeArgument,
             bool isAudio,
             bool isAudio,
             VideoType videoType,
             VideoType videoType,
+            bool forceEnableLogging,
             CancellationToken cancellationToken)
             CancellationToken cancellationToken)
         {
         {
             var args = extractChapters
             var args = extractChapters
@@ -614,7 +609,14 @@ namespace MediaBrowser.MediaEncoding.Encoder
                 EnableRaisingEvents = true
                 EnableRaisingEvents = true
             });
             });
 
 
-            _logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
+            if (forceEnableLogging)
+            {
+                _logger.Info("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
+            }
+            else
+            {
+                _logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
+            }
 
 
             using (var processWrapper = new ProcessWrapper(process, this, _logger))
             using (var processWrapper = new ProcessWrapper(process, this, _logger))
             {
             {