aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2021-09-21 20:49:02 +0200
committerGitHub <noreply@github.com>2021-09-21 20:49:02 +0200
commit46701e16b5a89eb99223320f0212aa4e1fb9afda (patch)
tree4805aeb53618fbf3603e8dd5d6f2b7f16af103d4
parentf1498d49ca753368156e51c3c7b69ab4bb5ae82a (diff)
parent52585a865e921196c6e47fe18b19b63107398d8d (diff)
Merge pull request #6589 from Bond-009/ffmpeg3
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs20
1 files changed, 14 insertions, 6 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index a7bcaf544..4cbd1bbc8 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -165,14 +165,22 @@ namespace MediaBrowser.MediaEncoding.Encoder
// User had cleared the custom path in UI
newPath = string.Empty;
}
- else if (Directory.Exists(path))
- {
- // Given path is directory, so resolve down to filename
- newPath = GetEncoderPathFromDirectory(path, "ffmpeg");
- }
else
{
- newPath = path;
+ if (Directory.Exists(path))
+ {
+ // Given path is directory, so resolve down to filename
+ newPath = GetEncoderPathFromDirectory(path, "ffmpeg");
+ }
+ else
+ {
+ newPath = path;
+ }
+
+ if (!new EncoderValidator(_logger, newPath).ValidateVersion())
+ {
+ throw new ResourceNotFoundException();
+ }
}
// Write the new ffmpeg path to the xml as <EncoderAppPath>