IsEmpty Filter and other small fixes (#3142)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2024-09-13 15:15:01 -07:00 committed by GitHub
parent e574caf7eb
commit 07a36176de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
96 changed files with 1361 additions and 1135 deletions

View file

@ -37,7 +37,7 @@ public interface ITaskScheduler
void CovertAllCoversToEncoding();
Task CleanupDbEntries();
Task CheckForUpdate();
Task SyncThemes();
}
public class TaskScheduler : ITaskScheduler
{
@ -165,8 +165,8 @@ public class TaskScheduler : ITaskScheduler
RecurringJob.AddOrUpdate(UpdateYearlyStatsTaskId, () => _statisticService.UpdateServerStatistics(),
Cron.Monthly, RecurringJobOptions);
RecurringJob.AddOrUpdate(SyncThemesTaskId, () => _themeService.SyncThemes(),
Cron.Weekly, RecurringJobOptions);
RecurringJob.AddOrUpdate(SyncThemesTaskId, () => SyncThemes(),
Cron.Daily, RecurringJobOptions);
await ScheduleKavitaPlusTasks();
}
@ -444,6 +444,11 @@ public class TaskScheduler : ITaskScheduler
await _versionUpdaterService.PushUpdate(update);
}
public async Task SyncThemes()
{
await _themeService.SyncThemes();
}
/// <summary>
/// If there is an enqueued or scheduled task for <see cref="ScannerService.ScanLibrary"/> method
/// </summary>