diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-01 15:08:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-01 15:08:40 -0400 |
| commit | 1d62c4302eb504eb5739e235e2c005014fde38a9 (patch) | |
| tree | fd354c9cd23e4c87be2c6c86b9d42f80a4b0da9d /MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | |
| parent | 8e605239244077fc76f468afbbc1cdd12a526218 (diff) | |
| parent | 8ab5e5aca9f940be2cdff1643f2500f30eb57214 (diff) | |
Merge pull request #2265 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index d9571f8e5..10fb025e0 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -121,6 +121,11 @@ namespace MediaBrowser.MediaEncoding.Encoder { get { + if (_hasExternalEncoder) + { + return "External"; + } + if (string.IsNullOrWhiteSpace(FFMpegPath)) { return null; @@ -185,6 +190,12 @@ namespace MediaBrowser.MediaEncoding.Encoder { ConfigureEncoderPaths(); + if (_hasExternalEncoder) + { + LogPaths(); + return; + } + // If the path was passed in, save it into config now. var encodingOptions = GetEncodingOptions(); var appPath = encodingOptions.EncoderAppPath; @@ -194,7 +205,7 @@ namespace MediaBrowser.MediaEncoding.Encoder if (!string.IsNullOrWhiteSpace(valueToSave)) { // if using system variable, don't save this. - if (IsSystemInstalledPath(valueToSave)) + if (IsSystemInstalledPath(valueToSave) || _hasExternalEncoder) { valueToSave = null; } @@ -209,6 +220,11 @@ namespace MediaBrowser.MediaEncoding.Encoder public async Task UpdateEncoderPath(string path, string pathType) { + if (_hasExternalEncoder) + { + return; + } + Tuple<string, string> newPaths; if (string.Equals(pathType, "system", StringComparison.OrdinalIgnoreCase)) @@ -265,6 +281,11 @@ namespace MediaBrowser.MediaEncoding.Encoder private void ConfigureEncoderPaths() { + if (_hasExternalEncoder) + { + return; + } + var appPath = GetEncodingOptions().EncoderAppPath; if (string.IsNullOrWhiteSpace(appPath)) |
