mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
Merge pull request #14028 from Shadowghost/cleanup-tasks
Cleanup Tasks and Validators
This commit is contained in:
commit
b4a58ee13a
@ -5,13 +5,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class ArtistsPostScanTask.
|
||||
/// </summary>
|
||||
public class ArtistsPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ArtistsPostScanTask.
|
||||
/// </summary>
|
||||
public class ArtistsPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
@ -45,5 +45,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
{
|
||||
return new ArtistsValidator(_libraryManager, _logger, _itemRepo).Run(progress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,13 +10,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class ArtistsValidator.
|
||||
/// </summary>
|
||||
public class ArtistsValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ArtistsValidator.
|
||||
/// </summary>
|
||||
public class ArtistsValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// The library manager.
|
||||
/// </summary>
|
||||
@ -82,7 +82,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
var deadEntities = _libraryManager.GetItemList(new InternalItemsQuery
|
||||
{
|
||||
IncludeItemTypes = new[] { BaseItemKind.MusicArtist },
|
||||
IncludeItemTypes = [BaseItemKind.MusicArtist],
|
||||
IsDeadArtist = true,
|
||||
IsLocked = false
|
||||
}).Cast<MusicArtist>().ToList();
|
||||
@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
continue;
|
||||
}
|
||||
|
||||
_logger.LogInformation("Deleting dead {2} {0} {1}.", item.Id.ToString("N", CultureInfo.InvariantCulture), item.Name, item.GetType().Name);
|
||||
_logger.LogInformation("Deleting dead {ItemType} {ItemId} {ItemName}", item.GetType().Name, item.Id.ToString("N", CultureInfo.InvariantCulture), item.Name);
|
||||
|
||||
_libraryManager.DeleteItem(
|
||||
item,
|
||||
@ -107,5 +107,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,17 +9,15 @@ using MediaBrowser.Controller.Collections;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class CollectionPostScanTask.
|
||||
/// </summary>
|
||||
public class CollectionPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class CollectionPostScanTask.
|
||||
/// </summary>
|
||||
public class CollectionPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ICollectionManager _collectionManager;
|
||||
private readonly ILogger<CollectionPostScanTask> _logger;
|
||||
@ -64,10 +62,10 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
{
|
||||
var movies = _libraryManager.GetItemList(new InternalItemsQuery
|
||||
{
|
||||
MediaTypes = new[] { MediaType.Video },
|
||||
IncludeItemTypes = new[] { BaseItemKind.Movie },
|
||||
MediaTypes = [MediaType.Video],
|
||||
IncludeItemTypes = [BaseItemKind.Movie],
|
||||
IsVirtualItem = false,
|
||||
OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) },
|
||||
OrderBy = [(ItemSortBy.SortName, SortOrder.Ascending)],
|
||||
Parent = library,
|
||||
StartIndex = startIndex,
|
||||
Limit = pagesize,
|
||||
@ -109,7 +107,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
var boxSets = _libraryManager.GetItemList(new InternalItemsQuery
|
||||
{
|
||||
IncludeItemTypes = new[] { BaseItemKind.BoxSet },
|
||||
IncludeItemTypes = [BaseItemKind.BoxSet],
|
||||
CollapseBoxSetItems = false,
|
||||
Recursive = true
|
||||
});
|
||||
@ -128,14 +126,14 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
{
|
||||
Name = collectionName,
|
||||
IsLocked = true
|
||||
});
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
await _collectionManager.AddToCollectionAsync(boxSet.Id, movieIds);
|
||||
await _collectionManager.AddToCollectionAsync(boxSet.Id, movieIds).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await _collectionManager.AddToCollectionAsync(boxSet.Id, movieIds);
|
||||
await _collectionManager.AddToCollectionAsync(boxSet.Id, movieIds).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
numComplete++;
|
||||
@ -153,5 +151,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class GenresPostScanTask.
|
||||
/// </summary>
|
||||
public class GenresPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class GenresPostScanTask.
|
||||
/// </summary>
|
||||
public class GenresPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
@ -45,5 +45,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
{
|
||||
return new GenresValidator(_libraryManager, _logger, _itemRepo).Run(progress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class GenresValidator.
|
||||
/// </summary>
|
||||
public class GenresValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// Class GenresValidator.
|
||||
/// </summary>
|
||||
public class GenresValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// The library manager.
|
||||
/// </summary>
|
||||
@ -100,5 +100,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class MusicGenresPostScanTask.
|
||||
/// </summary>
|
||||
public class MusicGenresPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MusicGenresPostScanTask.
|
||||
/// </summary>
|
||||
public class MusicGenresPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// The library manager.
|
||||
/// </summary>
|
||||
@ -45,5 +45,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
{
|
||||
return new MusicGenresValidator(_libraryManager, _logger, _itemRepo).Run(progress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class MusicGenresValidator.
|
||||
/// </summary>
|
||||
public class MusicGenresValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MusicGenresValidator.
|
||||
/// </summary>
|
||||
public class MusicGenresValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// The library manager.
|
||||
/// </summary>
|
||||
@ -77,5 +77,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,13 +9,13 @@ using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class PeopleValidator.
|
||||
/// </summary>
|
||||
public class PeopleValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// Class PeopleValidator.
|
||||
/// </summary>
|
||||
public class PeopleValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
@ -55,7 +55,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
var numPeople = people.Count;
|
||||
|
||||
_logger.LogDebug("Will refresh {0} people", numPeople);
|
||||
_logger.LogDebug("Will refresh {Amount} people", numPeople);
|
||||
|
||||
foreach (var person in people)
|
||||
{
|
||||
@ -104,11 +104,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
foreach (var item in deadEntities)
|
||||
{
|
||||
_logger.LogInformation(
|
||||
"Deleting dead {2} {0} {1}.",
|
||||
item.Id.ToString("N", CultureInfo.InvariantCulture),
|
||||
item.Name,
|
||||
item.GetType().Name);
|
||||
_logger.LogInformation("Deleting dead {ItemType} {ItemId} {ItemName}", item.GetType().Name, item.Id.ToString("N", CultureInfo.InvariantCulture), item.Name);
|
||||
|
||||
_libraryManager.DeleteItem(
|
||||
item,
|
||||
@ -123,5 +119,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
_logger.LogInformation("People validation complete");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class MusicGenresPostScanTask.
|
||||
/// </summary>
|
||||
public class StudiosPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MusicGenresPostScanTask.
|
||||
/// </summary>
|
||||
public class StudiosPostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
@ -46,5 +46,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
{
|
||||
return new StudiosValidator(_libraryManager, _logger, _itemRepo).Run(progress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library.Validators
|
||||
namespace Emby.Server.Implementations.Library.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// Class StudiosValidator.
|
||||
/// </summary>
|
||||
public class StudiosValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// Class StudiosValidator.
|
||||
/// </summary>
|
||||
public class StudiosValidator
|
||||
{
|
||||
/// <summary>
|
||||
/// The library manager.
|
||||
/// </summary>
|
||||
@ -81,7 +81,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
var deadEntities = _libraryManager.GetItemList(new InternalItemsQuery
|
||||
{
|
||||
IncludeItemTypes = new[] { BaseItemKind.Studio },
|
||||
IncludeItemTypes = [BaseItemKind.Studio],
|
||||
IsDeadStudio = true,
|
||||
IsLocked = false
|
||||
});
|
||||
@ -101,5 +101,4 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,13 +16,13 @@ using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks;
|
||||
|
||||
/// <summary>
|
||||
/// Class ScheduledTaskWorker.
|
||||
/// </summary>
|
||||
public class ScheduledTaskWorker : IScheduledTaskWorker
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ScheduledTaskWorker.
|
||||
/// </summary>
|
||||
public class ScheduledTaskWorker : IScheduledTaskWorker
|
||||
{
|
||||
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
|
||||
private readonly IApplicationPaths _applicationPaths;
|
||||
private readonly ILogger _logger;
|
||||
@ -675,5 +675,4 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,13 @@ using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks;
|
||||
|
||||
/// <summary>
|
||||
/// Class TaskManager.
|
||||
/// </summary>
|
||||
public class TaskManager : ITaskManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Class TaskManager.
|
||||
/// </summary>
|
||||
public class TaskManager : ITaskManager
|
||||
{
|
||||
/// <summary>
|
||||
/// The _task queue.
|
||||
/// </summary>
|
||||
@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
_applicationPaths = applicationPaths;
|
||||
_logger = logger;
|
||||
|
||||
ScheduledTasks = Array.Empty<IScheduledTaskWorker>();
|
||||
ScheduledTasks = [];
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -81,7 +81,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
|
||||
if (scheduledTask is null)
|
||||
{
|
||||
_logger.LogError("Unable to find scheduled task of type {0} in QueueScheduledTask.", typeof(T).Name);
|
||||
_logger.LogError("Unable to find scheduled task of type {Type} in QueueScheduledTask.", typeof(T).Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -116,13 +116,13 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
|
||||
if (scheduledTask is null)
|
||||
{
|
||||
_logger.LogError("Unable to find scheduled task of type {0} in Execute.", typeof(T).Name);
|
||||
_logger.LogError("Unable to find scheduled task of type {Type} in Execute.", typeof(T).Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
var type = scheduledTask.ScheduledTask.GetType();
|
||||
|
||||
_logger.LogDebug("Queuing task {0}", type.Name);
|
||||
_logger.LogDebug("Queuing task {Name}", type.Name);
|
||||
|
||||
lock (_taskQueue)
|
||||
{
|
||||
@ -141,7 +141,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
|
||||
if (scheduledTask is null)
|
||||
{
|
||||
_logger.LogError("Unable to find scheduled task of type {0} in QueueScheduledTask.", task.GetType().Name);
|
||||
_logger.LogError("Unable to find scheduled task of type {Type} in QueueScheduledTask.", task.GetType().Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -158,7 +158,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
{
|
||||
var type = task.ScheduledTask.GetType();
|
||||
|
||||
_logger.LogDebug("Queuing task {0}", type.Name);
|
||||
_logger.LogDebug("Queuing task {Name}", type.Name);
|
||||
|
||||
lock (_taskQueue)
|
||||
{
|
||||
@ -260,5 +260,4 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,14 +156,11 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return
|
||||
[
|
||||
new TaskTriggerInfo
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromHours(24).Ticks
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
private async Task<float?> CalculateLUFSAsync(string inputArgs, bool waitForExit, CancellationToken cancellationToken)
|
||||
@ -194,7 +191,7 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
|
||||
using var reader = process.StandardError;
|
||||
float? lufs = null;
|
||||
await foreach (var line in reader.ReadAllLinesAsync(cancellationToken))
|
||||
await foreach (var line in reader.ReadAllLinesAsync(cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
Match match = LUFSRegex().Match(line);
|
||||
if (match.Success)
|
||||
|
@ -17,13 +17,13 @@ using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Class ChapterImagesTask.
|
||||
/// </summary>
|
||||
public class ChapterImagesTask : IScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ChapterImagesTask.
|
||||
/// </summary>
|
||||
public class ChapterImagesTask : IScheduledTask
|
||||
{
|
||||
private readonly ILogger<ChapterImagesTask> _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
@ -71,15 +71,12 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return
|
||||
[
|
||||
new TaskTriggerInfo
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.DailyTrigger,
|
||||
TimeOfDayTicks = TimeSpan.FromHours(2).Ticks,
|
||||
MaxRuntimeTicks = TimeSpan.FromHours(4).Ticks
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -168,5 +165,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ using MediaBrowser.Model.Activity;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes old activity log entries.
|
||||
/// </summary>
|
||||
public class CleanActivityLogTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes old activity log entries.
|
||||
/// </summary>
|
||||
public class CleanActivityLogTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly ILocalizationManager _localization;
|
||||
private readonly IActivityManager _activityManager;
|
||||
private readonly IServerConfigurationManager _serverConfigurationManager;
|
||||
@ -73,5 +73,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ public class CleanupCollectionAndPlaylistPathsTask : IScheduledTask
|
||||
private readonly IPlaylistManager _playlistManager;
|
||||
private readonly ILogger<CleanupCollectionAndPlaylistPathsTask> _logger;
|
||||
private readonly IProviderManager _providerManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CleanupCollectionAndPlaylistPathsTask"/> class.
|
||||
@ -37,21 +36,18 @@ public class CleanupCollectionAndPlaylistPathsTask : IScheduledTask
|
||||
/// <param name="playlistManager">Instance of the <see cref="IPlaylistManager"/> interface.</param>
|
||||
/// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
|
||||
/// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
|
||||
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
|
||||
public CleanupCollectionAndPlaylistPathsTask(
|
||||
ILocalizationManager localization,
|
||||
ICollectionManager collectionManager,
|
||||
IPlaylistManager playlistManager,
|
||||
ILogger<CleanupCollectionAndPlaylistPathsTask> logger,
|
||||
IProviderManager providerManager,
|
||||
IFileSystem fileSystem)
|
||||
IProviderManager providerManager)
|
||||
{
|
||||
_localization = localization;
|
||||
_collectionManager = collectionManager;
|
||||
_playlistManager = playlistManager;
|
||||
_logger = logger;
|
||||
_providerManager = providerManager;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -135,6 +131,9 @@ public class CleanupCollectionAndPlaylistPathsTask : IScheduledTask
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return [new TaskTriggerInfo() { Type = TaskTriggerInfoType.StartupTrigger }];
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.StartupTrigger,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes old cache files.
|
||||
/// </summary>
|
||||
public class DeleteCacheFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes old cache files.
|
||||
/// </summary>
|
||||
public class DeleteCacheFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the application paths.
|
||||
/// </summary>
|
||||
@ -70,11 +70,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return
|
||||
[
|
||||
// Every so often
|
||||
new TaskTriggerInfo { Type = TaskTriggerInfoType.IntervalTrigger, IntervalTicks = TimeSpan.FromHours(24).Ticks }
|
||||
];
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromHours(24).Ticks
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -140,5 +140,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,13 +9,13 @@ using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes old log files.
|
||||
/// </summary>
|
||||
public class DeleteLogFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes old log files.
|
||||
/// </summary>
|
||||
public class DeleteLogFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly IConfigurationManager _configurationManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILocalizationManager _localization;
|
||||
@ -60,10 +60,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return
|
||||
[
|
||||
new TaskTriggerInfo { Type = TaskTriggerInfoType.IntervalTrigger, IntervalTicks = TimeSpan.FromHours(24).Ticks }
|
||||
];
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromHours(24).Ticks
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -97,5 +98,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,13 +10,13 @@ using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes all transcoding temp files.
|
||||
/// </summary>
|
||||
public class DeleteTranscodeFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes all transcoding temp files.
|
||||
/// </summary>
|
||||
public class DeleteTranscodeFileTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly ILogger<DeleteTranscodeFileTask> _logger;
|
||||
private readonly IConfigurationManager _configurationManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
@ -65,18 +65,16 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return
|
||||
[
|
||||
new TaskTriggerInfo
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.StartupTrigger
|
||||
},
|
||||
new TaskTriggerInfo
|
||||
};
|
||||
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromHours(24).Ticks
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -123,5 +121,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,11 +62,11 @@ public class MediaSegmentExtractionTask : IScheduledTask
|
||||
|
||||
var query = new InternalItemsQuery
|
||||
{
|
||||
MediaTypes = new[] { MediaType.Video, MediaType.Audio },
|
||||
MediaTypes = [MediaType.Video, MediaType.Audio],
|
||||
IsVirtualItem = false,
|
||||
IncludeItemTypes = _itemTypes,
|
||||
DtoOptions = new DtoOptions(true),
|
||||
SourceTypes = new[] { SourceType.Library },
|
||||
SourceTypes = [SourceType.Library],
|
||||
Recursive = true,
|
||||
Limit = pagesize
|
||||
};
|
||||
|
@ -5,19 +5,17 @@ using System.Threading.Tasks;
|
||||
using Jellyfin.Database.Implementations;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Optimizes Jellyfin's database by issuing a VACUUM command.
|
||||
/// </summary>
|
||||
public class OptimizeDatabaseTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Optimizes Jellyfin's database by issuing a VACUUM command.
|
||||
/// </summary>
|
||||
public class OptimizeDatabaseTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly ILogger<OptimizeDatabaseTask> _logger;
|
||||
private readonly ILocalizationManager _localization;
|
||||
private readonly IDbContextFactory<JellyfinDbContext> _provider;
|
||||
private readonly IJellyfinDatabaseProvider _jellyfinDatabaseProvider;
|
||||
|
||||
/// <summary>
|
||||
@ -25,17 +23,14 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// </summary>
|
||||
/// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
|
||||
/// <param name="localization">Instance of the <see cref="ILocalizationManager"/> interface.</param>
|
||||
/// <param name="provider">Instance of the <see cref="IDbContextFactory{JellyfinDbContext}"/> interface.</param>
|
||||
/// <param name="jellyfinDatabaseProvider">Instance of the JellyfinDatabaseProvider that can be used for provider specific operations.</param>
|
||||
public OptimizeDatabaseTask(
|
||||
ILogger<OptimizeDatabaseTask> logger,
|
||||
ILocalizationManager localization,
|
||||
IDbContextFactory<JellyfinDbContext> provider,
|
||||
IJellyfinDatabaseProvider jellyfinDatabaseProvider)
|
||||
{
|
||||
_logger = logger;
|
||||
_localization = localization;
|
||||
_provider = provider;
|
||||
_jellyfinDatabaseProvider = jellyfinDatabaseProvider;
|
||||
}
|
||||
|
||||
@ -63,11 +58,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return
|
||||
[
|
||||
// Every so often
|
||||
new TaskTriggerInfo { Type = TaskTriggerInfoType.IntervalTrigger, IntervalTicks = TimeSpan.FromHours(24).Ticks }
|
||||
];
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromHours(24).Ticks
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -84,5 +79,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
_logger.LogError(e, "Error while optimizing jellyfin.db");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,13 +6,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Class PeopleValidationTask.
|
||||
/// </summary>
|
||||
public class PeopleValidationTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class PeopleValidationTask.
|
||||
/// </summary>
|
||||
public class PeopleValidationTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
||||
@ -54,13 +54,10 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <returns>An <see cref="IEnumerable{TaskTriggerInfo}"/> containing the default trigger infos for this task.</returns>
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new TaskTriggerInfo
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromDays(7).Ticks
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -69,5 +66,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
{
|
||||
return _libraryManager.ValidatePeopleAsync(progress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,13 +10,13 @@ using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Plugin Update Task.
|
||||
/// </summary>
|
||||
public class PluginUpdateTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Plugin Update Task.
|
||||
/// </summary>
|
||||
public class PluginUpdateTask : IScheduledTask, IConfigurableScheduledTask
|
||||
{
|
||||
private readonly ILogger<PluginUpdateTask> _logger;
|
||||
|
||||
private readonly IInstallationManager _installationManager;
|
||||
@ -59,11 +59,16 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
// At startup
|
||||
yield return new TaskTriggerInfo { Type = TaskTriggerInfoType.StartupTrigger };
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.StartupTrigger
|
||||
};
|
||||
|
||||
// Every so often
|
||||
yield return new TaskTriggerInfo { Type = TaskTriggerInfoType.IntervalTrigger, IntervalTicks = TimeSpan.FromHours(24).Ticks };
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfoType.IntervalTrigger,
|
||||
IntervalTicks = TimeSpan.FromHours(24).Ticks
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -96,15 +101,15 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error downloading {0}", package.Name);
|
||||
_logger.LogError(ex, "Error downloading {Name}", package.Name);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error updating {0}", package.Name);
|
||||
_logger.LogError(ex, "Error updating {Name}", package.Name);
|
||||
}
|
||||
catch (InvalidDataException ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error updating {0}", package.Name);
|
||||
_logger.LogError(ex, "Error updating {Name}", package.Name);
|
||||
}
|
||||
|
||||
// Update progress
|
||||
@ -116,5 +121,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Class RefreshMediaLibraryTask.
|
||||
/// </summary>
|
||||
public class RefreshMediaLibraryTask : IScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Class RefreshMediaLibraryTask.
|
||||
/// </summary>
|
||||
public class RefreshMediaLibraryTask : IScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// The _library manager.
|
||||
/// </summary>
|
||||
@ -62,5 +62,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||
|
||||
return ((LibraryManager)_libraryManager).ValidateMediaLibraryInternal(progress, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,25 +3,25 @@ using System.Threading;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a task trigger that fires everyday.
|
||||
/// </summary>
|
||||
public sealed class DailyTrigger : ITaskTrigger, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a task trigger that fires everyday.
|
||||
/// </summary>
|
||||
public sealed class DailyTrigger : ITaskTrigger, IDisposable
|
||||
{
|
||||
private readonly TimeSpan _timeOfDay;
|
||||
private Timer? _timer;
|
||||
private bool _disposed = false;
|
||||
private bool _disposed;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DailyTrigger"/> class.
|
||||
/// </summary>
|
||||
/// <param name="timeofDay">The time of day to trigger the task to run.</param>
|
||||
/// <param name="timeOfDay">The time of day to trigger the task to run.</param>
|
||||
/// <param name="taskOptions">The options of this task.</param>
|
||||
public DailyTrigger(TimeSpan timeofDay, TaskOptions taskOptions)
|
||||
public DailyTrigger(TimeSpan timeOfDay, TaskOptions taskOptions)
|
||||
{
|
||||
_timeOfDay = timeofDay;
|
||||
_timeOfDay = timeOfDay;
|
||||
TaskOptions = taskOptions;
|
||||
}
|
||||
|
||||
@ -83,5 +83,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,17 +4,17 @@ using System.Threading;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a task trigger that runs repeatedly on an interval.
|
||||
/// </summary>
|
||||
public sealed class IntervalTrigger : ITaskTrigger, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a task trigger that runs repeatedly on an interval.
|
||||
/// </summary>
|
||||
public sealed class IntervalTrigger : ITaskTrigger, IDisposable
|
||||
{
|
||||
private readonly TimeSpan _interval;
|
||||
private DateTime _lastStartDate;
|
||||
private Timer? _timer;
|
||||
private bool _disposed = false;
|
||||
private bool _disposed;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IntervalTrigger"/> class.
|
||||
@ -103,5 +103,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers;
|
||||
|
||||
/// <summary>
|
||||
/// Class StartupTaskTrigger.
|
||||
/// </summary>
|
||||
public sealed class StartupTrigger : ITaskTrigger
|
||||
{
|
||||
/// <summary>
|
||||
/// Class StartupTaskTrigger.
|
||||
/// </summary>
|
||||
public sealed class StartupTrigger : ITaskTrigger
|
||||
{
|
||||
private const int DelayMs = 3000;
|
||||
|
||||
/// <summary>
|
||||
@ -50,5 +50,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
{
|
||||
Triggered?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ using System.Threading;
|
||||
using MediaBrowser.Model.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
namespace Emby.Server.Implementations.ScheduledTasks.Triggers;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a task trigger that fires on a weekly basis.
|
||||
/// </summary>
|
||||
public sealed class WeeklyTrigger : ITaskTrigger, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a task trigger that fires on a weekly basis.
|
||||
/// </summary>
|
||||
public sealed class WeeklyTrigger : ITaskTrigger, IDisposable
|
||||
{
|
||||
private readonly TimeSpan _timeOfDay;
|
||||
private readonly DayOfWeek _dayOfWeek;
|
||||
private Timer? _timer;
|
||||
@ -18,12 +18,12 @@ namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WeeklyTrigger"/> class.
|
||||
/// </summary>
|
||||
/// <param name="timeofDay">The time of day to trigger the task to run.</param>
|
||||
/// <param name="timeOfDay">The time of day to trigger the task to run.</param>
|
||||
/// <param name="dayOfWeek">The day of week.</param>
|
||||
/// <param name="taskOptions">The options of this task.</param>
|
||||
public WeeklyTrigger(TimeSpan timeofDay, DayOfWeek dayOfWeek, TaskOptions taskOptions)
|
||||
public WeeklyTrigger(TimeSpan timeOfDay, DayOfWeek dayOfWeek, TaskOptions taskOptions)
|
||||
{
|
||||
_timeOfDay = timeofDay;
|
||||
_timeOfDay = timeOfDay;
|
||||
_dayOfWeek = dayOfWeek;
|
||||
TaskOptions = taskOptions;
|
||||
}
|
||||
@ -106,5 +106,4 @@ namespace Emby.Server.Implementations.ScheduledTasks.Triggers
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user