소스 검색

Restore original flag behaviour

Joshua M. Boniface 1 년 전
부모
커밋
bf5f00a383
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

+ 9 - 4
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

@@ -117,12 +117,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
         /// </summary>
         public void SetFFmpegPath()
         {
-            // 1) Check if the --ffmpeg CLI switch has been given
-            var ffmpegPath = _startupOptionFFmpegPath;
+            // 1) Custom path stored in config/encoding xml file under tag <EncoderAppPath> takes precedence
+            var ffmpegPath = _configurationManager.GetEncodingOptions().EncoderAppPath;
             if (string.IsNullOrEmpty(ffmpegPath))
             {
-                // 2) Check "ffmpeg"
-                ffmpegPath = "ffmpeg";
+                // 2) Check if the --ffmpeg CLI switch has been given
+                ffmpegPath = _startupOptionFFmpegPath;
+                if (string.IsNullOrEmpty(ffmpegPath))
+                {
+                    // 3) Check "ffmpeg"
+                    ffmpegPath = "ffmpeg";
+                }
             }
 
             if (!ValidatePath(ffmpegPath))