diff options
| author | PloughPuff <ploughpuff@protonmail.com> | 2019-02-27 16:33:08 +0000 |
|---|---|---|
| committer | Ploughpuff <ploughpuff@protonmail.com> | 2019-03-05 21:29:15 +0000 |
| commit | 8104e739d5b83d0d6563bb685f910697e60d6c12 (patch) | |
| tree | 24c8dfcf23c26cda58a8428c6fe0f2a73eb000ed /MediaBrowser.MediaEncoding | |
| parent | 632968dc817a398bff84ca3ef82337b4e5786416 (diff) | |
Address review comments from Bond
Diffstat (limited to 'MediaBrowser.MediaEncoding')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index 9aad67ec7..265c043b9 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -282,12 +282,18 @@ namespace MediaBrowser.MediaEncoding.Encoder } } + /// <summary> + /// With the given path string, replaces the filename with ffprobe, taking case + /// of any file extension (like .exe on windows). + /// </summary> + /// <param name="appPath"></param> + /// <returns></returns> private string GetProbePathFromEncoderPath(string appPath) { if (!string.IsNullOrEmpty(appPath)) { - string pattern = @"[^\/\\]+?(\.[^\/\\\n.]+)?$"; - string substitution = @"ffprobe$1"; + const string pattern = @"[^\/\\]+?(\.[^\/\\\n.]+)?$"; + const string substitution = @"ffprobe$1"; return Regex.Replace(appPath, pattern, substitution); } |
