aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs2
-rw-r--r--Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs2
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs2
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs18
-rw-r--r--Emby.Server.Implementations/ServerApplicationPaths.cs18
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs2
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs2
-rw-r--r--MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs6
-rw-r--r--MediaBrowser.Controller/IServerApplicationPaths.cs4
9 files changed, 31 insertions, 25 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index fef461b9a..6bd5995f9 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1446,7 +1446,7 @@ namespace Emby.Server.Implementations
CanSelfRestart = CanSelfRestart,
CanLaunchWebBrowser = CanLaunchWebBrowser,
HasUpdateAvailable = HasUpdateAvailable,
- TranscodingTempPath = ApplicationPaths.TranscodingTempPath,
+ TranscodingTempPath = ApplicationPaths.TranscodePath,
ServerName = FriendlyName,
LocalAddress = localAddress,
SupportsLibraryMonitor = true,
diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
index c7f92b80b..fe705cbe2 100644
--- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
+++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs
@@ -91,7 +91,7 @@ namespace Emby.Server.Implementations.Configuration
{
var encodingConfig = this.GetConfiguration<EncodingOptions>("encoding");
- ((ServerApplicationPaths)ApplicationPaths).TranscodingTempPath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ?
+ ((ServerApplicationPaths)ApplicationPaths).TranscodePath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ?
null :
Path.Combine(encodingConfig.TranscodingTempPath, "transcodes");
}
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
index d12c96392..2ea171031 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs
@@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
protected void SetTempFilePath(string extension)
{
- TempFilePath = Path.Combine(AppPaths.GetTranscodingTempPath(), UniqueId + "." + extension);
+ TempFilePath = Path.Combine(AppPaths.GetTranscodePath(), UniqueId + "." + extension);
}
public virtual Task Open(CancellationToken openCancellationToken)
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
index c343a7d48..d1c083e6b 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs
@@ -39,7 +39,13 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// Creates the triggers that define when the task will run
/// </summary>
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
- public IEnumerable<TaskTriggerInfo> GetDefaultTriggers() => new List<TaskTriggerInfo>();
+ public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
+ {
+ yield return new TaskTriggerInfo
+ {
+ Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks
+ };
+ }
/// <summary>
/// Returns the task to be executed
@@ -54,7 +60,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
try
{
- DeleteTempFilesFromDirectory(cancellationToken, ApplicationPaths.TranscodingTempPath, minDateModified, progress);
+ DeleteTempFilesFromDirectory(cancellationToken, ApplicationPaths.TranscodePath, minDateModified, progress);
}
catch (DirectoryNotFoundException)
{
@@ -138,17 +144,17 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
}
}
- public string Name => "Transcoding temp cleanup";
+ public string Name => "Transcode file cleanup";
- public string Description => "Deletes transcoding temp files older than 24 hours.";
+ public string Description => "Deletes transcode files more than 24 hours old.";
public string Category => "Maintenance";
- public string Key => "DeleteTranscodingTempFiles";
+ public string Key => "DeleteTranscodeFiles";
public bool IsHidden => false;
- public bool IsEnabled => false;
+ public bool IsEnabled => true;
public bool IsLogged => true;
}
diff --git a/Emby.Server.Implementations/ServerApplicationPaths.cs b/Emby.Server.Implementations/ServerApplicationPaths.cs
index 46195cc74..e9119e76c 100644
--- a/Emby.Server.Implementations/ServerApplicationPaths.cs
+++ b/Emby.Server.Implementations/ServerApplicationPaths.cs
@@ -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;
}
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index a5d65a716..a962b0240 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -167,7 +167,7 @@ namespace MediaBrowser.Api
/// </summary>
private void DeleteEncodedMediaCache()
{
- var path = ConfigurationManager.ApplicationPaths.GetTranscodingTempPath();
+ var path = ConfigurationManager.ApplicationPaths.GetTranscodePath();
if (!Directory.Exists(path))
{
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 7bfe0e0ce..c7104c950 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -141,7 +141,7 @@ namespace MediaBrowser.Api.Playback
var filename = data.GetMD5().ToString("N", CultureInfo.InvariantCulture);
var ext = outputFileExtension.ToLowerInvariant();
- var folder = ServerConfigurationManager.ApplicationPaths.TranscodingTempPath;
+ var folder = ServerConfigurationManager.ApplicationPaths.TranscodePath;
if (EnableOutputInSubFolder)
{
diff --git a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
index 6a2c7ae03..7487f2b64 100644
--- a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
+++ b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs
@@ -97,7 +97,7 @@ namespace MediaBrowser.Api.Playback.Hls
public Task<object> Get(GetHlsPlaylistLegacy request)
{
var file = request.PlaylistId + Path.GetExtension(Request.PathInfo);
- file = Path.Combine(_appPaths.TranscodingTempPath, file);
+ file = Path.Combine(_appPaths.TranscodePath, file);
return GetFileResult(file, file);
}
@@ -116,7 +116,7 @@ namespace MediaBrowser.Api.Playback.Hls
{
var file = request.SegmentId + Path.GetExtension(Request.PathInfo);
- var transcodeFolderPath = _config.ApplicationPaths.TranscodingTempPath;
+ var transcodeFolderPath = _config.ApplicationPaths.TranscodePath;
file = Path.Combine(transcodeFolderPath, file);
var normalizedPlaylistId = request.PlaylistId;
@@ -136,7 +136,7 @@ namespace MediaBrowser.Api.Playback.Hls
{
// TODO: Deprecate with new iOS app
var file = request.SegmentId + Path.GetExtension(Request.PathInfo);
- file = Path.Combine(_appPaths.TranscodingTempPath, file);
+ file = Path.Combine(_appPaths.TranscodePath, file);
return ResultFactory.GetStaticFileResult(Request, file, FileShareMode.ReadWrite);
}
diff --git a/MediaBrowser.Controller/IServerApplicationPaths.cs b/MediaBrowser.Controller/IServerApplicationPaths.cs
index 15d7e9f62..127a31329 100644
--- a/MediaBrowser.Controller/IServerApplicationPaths.cs
+++ b/MediaBrowser.Controller/IServerApplicationPaths.cs
@@ -86,7 +86,7 @@ namespace MediaBrowser.Controller
/// Gets the transcoding temporary path.
/// </summary>
/// <value>The transcoding temporary path.</value>
- string TranscodingTempPath { get; }
+ string TranscodePath { get; }
/// <summary>
/// Gets the internal metadata path.
@@ -97,6 +97,6 @@ namespace MediaBrowser.Controller
string ArtistsPath { get; }
- string GetTranscodingTempPath();
+ string GetTranscodePath();
}
}