move the transcode path

This commit is contained in:
dkanada 2019-08-29 00:14:50 -07:00
parent 503ab56a59
commit 21ff63c371
4 changed files with 15 additions and 18 deletions

View File

@ -66,7 +66,7 @@ namespace Emby.Server.Implementations.Configuration
{
base.AddParts(factories);
UpdateTranscodingTempPath();
UpdateTranscodePath();
}
/// <summary>
@ -87,13 +87,13 @@ namespace Emby.Server.Implementations.Configuration
/// <summary>
/// Updates the transcoding temporary path.
/// </summary>
private void UpdateTranscodingTempPath()
private void UpdateTranscodePath()
{
var encodingConfig = this.GetConfiguration<EncodingOptions>("encoding");
((ServerApplicationPaths)ApplicationPaths).TranscodingTempPath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ?
null :
Path.Combine(encodingConfig.TranscodingTempPath, "transcoding-temp");
Path.Combine(encodingConfig.TranscodingTempPath, "transcodes");
}
protected override void OnNamedConfigurationUpdated(string key, object configuration)
@ -102,7 +102,7 @@ namespace Emby.Server.Implementations.Configuration
if (string.Equals(key, "encoding", StringComparison.OrdinalIgnoreCase))
{
UpdateTranscodingTempPath();
UpdateTranscodePath();
}
}

View File

@ -13,23 +13,22 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// <summary>
/// Deletes all transcoding temp files
/// </summary>
public class DeleteTranscodingTempTask : IScheduledTask, IConfigurableScheduledTask
public class DeleteTranscodeFileTask : IScheduledTask, IConfigurableScheduledTask
{
/// <summary>
/// Gets or sets the application paths.
/// </summary>
/// <value>The application paths.</value>
protected ServerApplicationPaths ApplicationPaths { get; set; }
private ServerApplicationPaths ApplicationPaths { get; set; }
private readonly ILogger _logger;
private readonly IFileSystem _fileSystem;
/// <summary>
/// Initializes a new instance of the <see cref="DeleteTranscodingTempTask" /> class.
/// Initializes a new instance of the <see cref="DeleteTranscodeFileTask" /> class.
/// </summary>
public DeleteTranscodingTempTask(ServerApplicationPaths appPaths, ILogger logger, IFileSystem fileSystem)
public DeleteTranscodeFileTask(ServerApplicationPaths appPaths, ILogger logger, IFileSystem fileSystem)
{
ApplicationPaths = appPaths;
_logger = logger;

View File

@ -10,7 +10,7 @@ using MediaBrowser.Model.Tasks;
namespace Emby.Server.Implementations.ScheduledTasks
{
/// <summary>
/// Class RefreshMediaLibraryTask
/// Class RefreshMediaLibraryTask.
/// </summary>
public class RefreshMediaLibraryTask : IScheduledTask
{
@ -31,15 +31,14 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
/// <summary>
/// Creates the triggers that define when the task will run
/// Creates the triggers that define when the task will run.
/// </summary>
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
{
return new[] {
// Every so often
new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(12).Ticks}
yield return new TaskTriggerInfo
{
Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(12).Ticks
};
}
@ -60,7 +59,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
public string Name => "Scan media library";
public string Description => "Scans your media library and refreshes metatata based on configuration.";
public string Description => "Scans your media library for new files and refreshes metadata.";
public string Category => "Library";

View File

@ -278,7 +278,7 @@ namespace MediaBrowser.Providers.Manager
var currentOptions = options;
var typeOptions = libraryOptions.GetTypeOptions(item.GetType().Name);
var typeFetcherOrder = typeOptions == null ? null : typeOptions.ImageFetcherOrder;
var typeFetcherOrder = typeOptions?.ImageFetcherOrder;
return ImageProviders.Where(i => CanRefresh(i, item, libraryOptions, options, refreshOptions, includeDisabled))
.OrderBy(i =>
@ -287,7 +287,6 @@ namespace MediaBrowser.Providers.Manager
if (!(i is ILocalImageProvider))
{
var fetcherOrder = typeFetcherOrder ?? currentOptions.ImageFetcherOrder;
var index = Array.IndexOf(fetcherOrder, i.Name);
if (index != -1)