mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
separate task buttons script
This commit is contained in:
parent
449485d3d2
commit
9e809b06c4
@ -32,6 +32,9 @@ namespace MediaBrowser.Api.ScheduledTasks
|
|||||||
{
|
{
|
||||||
[ApiMember(Name = "IsHidden", Description = "Optional filter tasks that are hidden, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "IsHidden", Description = "Optional filter tasks that are hidden, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||||
public bool? IsHidden { get; set; }
|
public bool? IsHidden { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "IsEnabled", Description = "Optional filter tasks that are enabled, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||||
|
public bool? IsEnabled { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -132,6 +135,25 @@ namespace MediaBrowser.Api.ScheduledTasks
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request.IsEnabled.HasValue)
|
||||||
|
{
|
||||||
|
var val = request.IsEnabled.Value;
|
||||||
|
|
||||||
|
result = result.Where(i =>
|
||||||
|
{
|
||||||
|
var isEnabled = false;
|
||||||
|
|
||||||
|
var configurableTask = i.ScheduledTask as IConfigurableScheduledTask;
|
||||||
|
|
||||||
|
if (configurableTask != null)
|
||||||
|
{
|
||||||
|
isEnabled = configurableTask.IsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isEnabled == val;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var infos = result
|
var infos = result
|
||||||
.Select(ScheduledTaskHelpers.GetTaskInfo)
|
.Select(ScheduledTaskHelpers.GetTaskInfo)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
@ -54,10 +54,13 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
|||||||
return _config.GetAutoOrganizeOptions().TvOptions;
|
return _config.GetAutoOrganizeOptions().TvOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
|
public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
|
||||||
{
|
{
|
||||||
return new TvFolderOrganizer(_libraryManager, _logger, _fileSystem, _libraryMonitor, _organizationService, _config, _providerManager)
|
if (GetTvOptions().IsEnabled)
|
||||||
.Organize(GetTvOptions(), cancellationToken, progress);
|
{
|
||||||
|
await new TvFolderOrganizer(_libraryManager, _logger, _fileSystem, _libraryMonitor, _organizationService, _config, _providerManager)
|
||||||
|
.Organize(GetTvOptions(), cancellationToken, progress).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<ITaskTrigger> GetDefaultTriggers()
|
public IEnumerable<ITaskTrigger> GetDefaultTriggers()
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"LabelDashboardSourcePath": "Web client source path:",
|
"LabelDashboardSourcePath": "Web client source path:",
|
||||||
"LabelDashboardSourcePathHelp": "If running the server from source, specify the path to the dashboard-ui folder. All web client files will be served from this location.",
|
"LabelDashboardSourcePathHelp": "If running the server from source, specify the path to the dashboard-ui folder. All web client files will be served from this location.",
|
||||||
"ButtonConvertMedia": "Convert media",
|
"ButtonConvertMedia": "Convert media",
|
||||||
"ButtonOrganizeNow": "Organize now",
|
"ButtonOrganize": "Organize",
|
||||||
"ButtonOk": "Ok",
|
"ButtonOk": "Ok",
|
||||||
"ButtonCancel": "Cancel",
|
"ButtonCancel": "Cancel",
|
||||||
"ButtonNew": "New",
|
"ButtonNew": "New",
|
||||||
|
@ -532,9 +532,9 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
|
|
||||||
SetStaticProperties();
|
SetStaticProperties();
|
||||||
|
|
||||||
await ((UserManager)UserManager).Initialize().ConfigureAwait(false);
|
|
||||||
|
|
||||||
SetKernelProperties();
|
SetKernelProperties();
|
||||||
|
|
||||||
|
await ((UserManager)UserManager).Initialize().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override INetworkManager CreateNetworkManager(ILogger logger)
|
protected override INetworkManager CreateNetworkManager(ILogger logger)
|
||||||
|
@ -366,6 +366,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||||||
"mediaplayer-video.js",
|
"mediaplayer-video.js",
|
||||||
"nowplayingbar.js",
|
"nowplayingbar.js",
|
||||||
"nowplayingpage.js",
|
"nowplayingpage.js",
|
||||||
|
"taskbutton.js",
|
||||||
|
|
||||||
"ratingdialog.js",
|
"ratingdialog.js",
|
||||||
"aboutpage.js",
|
"aboutpage.js",
|
||||||
|
@ -126,6 +126,9 @@
|
|||||||
<Content Include="dashboard-ui\scripts\syncsettings.js">
|
<Content Include="dashboard-ui\scripts\syncsettings.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\scripts\taskbutton.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\usernew.js">
|
<Content Include="dashboard-ui\scripts\usernew.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user