Fix GetTranscodePath function and cache path update logline

* GetTranscodePath returned an empty string after the option was left
blank in the web UI
* Unified the log style for all paths
This commit is contained in:
Bond_009
2019-12-04 22:18:37 +01:00
parent f3ca4631c3
commit 4a0df15bbd
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;
}
}
}