mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 07:10:45 +00:00
Address review comments from Bond
This commit is contained in:
parent
632968dc81
commit
8104e739d5
2 changed files with 16 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue