Merge pull request #2098 from Bond-009/config2

Fix GetTranscodePath function and cache path update logline
This commit is contained in:
Vasily
2019-12-05 12:05:46 +03:00
committed by GitHub
2 changed files with 15 additions and 6 deletions

View File

@@ -22,7 +22,14 @@ namespace MediaBrowser.Common.Configuration
/// <param name="configurationManager">The Configuration manager.</param>
/// <returns>The transcoding temp path.</returns>
public static string GetTranscodePath(this IConfigurationManager configurationManager)
=> configurationManager.GetEncodingOptions().TranscodingTempPath
?? Path.Combine(configurationManager.CommonApplicationPaths.ProgramDataPath, "transcodes");
{
var transcodingTempPath = configurationManager.GetEncodingOptions().TranscodingTempPath;
if (string.IsNullOrEmpty(transcodingTempPath))
{
return Path.Combine(configurationManager.CommonApplicationPaths.ProgramDataPath, "transcodes");
}
return transcodingTempPath;
}
}
}