Unwrapped GetDirectoryName and DirectorySeperatorChar

This commit is contained in:
Erwin de Haan
2019-01-26 21:47:11 +01:00
parent a05d803d4c
commit 3a831994f6
73 changed files with 119 additions and 114 deletions

View File

@@ -353,7 +353,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
private string GetProbePathFromEncoderPath(string appPath)
{
return FileSystem.GetFilePaths(FileSystem.GetDirectoryName(appPath))
return FileSystem.GetFilePaths(Path.GetDirectoryName(appPath))
.FirstOrDefault(i => string.Equals(Path.GetFileNameWithoutExtension(i), "ffprobe", StringComparison.OrdinalIgnoreCase));
}
@@ -608,7 +608,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
var tempExtractPath = Path.Combine(ConfigurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + ".jpg");
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(tempExtractPath));
FileSystem.CreateDirectory(Path.GetDirectoryName(tempExtractPath));
// apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600.
// This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar