minor changes to transcode cleanup scheduled task

This commit is contained in:
dkanada
2019-10-24 10:50:25 +09:00
parent c0d10800ab
commit f3ca37e523
9 changed files with 31 additions and 25 deletions

View File

@@ -11,7 +11,7 @@ namespace Emby.Server.Implementations
public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths
{
private string _defaultTranscodingTempPath;
private string _transcodingTempPath;
private string _transcodePath;
private string _internalMetadataPath;
/// <summary>
@@ -107,19 +107,19 @@ namespace Emby.Server.Implementations
/// <value>The user configuration directory path.</value>
public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users");
public string DefaultTranscodingTempPath => _defaultTranscodingTempPath ?? (_defaultTranscodingTempPath = Path.Combine(ProgramDataPath, "transcoding-temp"));
public string DefaultTranscodePath => _defaultTranscodingTempPath ?? (_defaultTranscodingTempPath = Path.Combine(ProgramDataPath, "transcodes"));
public string TranscodingTempPath
public string TranscodePath
{
get => _transcodingTempPath ?? (_transcodingTempPath = DefaultTranscodingTempPath);
set => _transcodingTempPath = value;
get => _transcodePath ?? (_transcodePath = DefaultTranscodePath);
set => _transcodePath = value;
}
public string GetTranscodingTempPath()
public string GetTranscodePath()
{
var path = TranscodingTempPath;
var path = TranscodePath;
if (!string.Equals(path, DefaultTranscodingTempPath, StringComparison.OrdinalIgnoreCase))
if (!string.Equals(path, DefaultTranscodePath, StringComparison.OrdinalIgnoreCase))
{
try
{
@@ -136,7 +136,7 @@ namespace Emby.Server.Implementations
}
}
path = DefaultTranscodingTempPath;
path = DefaultTranscodePath;
Directory.CreateDirectory(path);
return path;
}