Run played sync job after content sync instead of on its own

This commit is contained in:
sephrat 2023-03-10 18:56:12 +01:00
commit 77ce52e68a
4 changed files with 0 additions and 40 deletions

View file

@ -98,8 +98,6 @@ namespace Ombi.Schedule
{ {
await OmbiQuartz.Instance.AddJob<IEmbyContentSync>(nameof(IEmbyContentSync), "Emby", JobSettingsHelper.EmbyContent(s)); await OmbiQuartz.Instance.AddJob<IEmbyContentSync>(nameof(IEmbyContentSync), "Emby", JobSettingsHelper.EmbyContent(s));
await OmbiQuartz.Instance.AddJob<IEmbyContentSync>(nameof(IEmbyContentSync) + "RecentlyAdded", "Emby", JobSettingsHelper.EmbyRecentlyAddedSync(s), new Dictionary<string, string> { { JobDataKeys.EmbyRecentlyAddedSearch, "true" } }); await OmbiQuartz.Instance.AddJob<IEmbyContentSync>(nameof(IEmbyContentSync) + "RecentlyAdded", "Emby", JobSettingsHelper.EmbyRecentlyAddedSync(s), new Dictionary<string, string> { { JobDataKeys.EmbyRecentlyAddedSearch, "true" } });
await OmbiQuartz.Instance.AddJob<IEmbyPlayedSync>(nameof(IEmbyPlayedSync), "Emby", JobSettingsHelper.EmbyContent(s));
await OmbiQuartz.Instance.AddJob<IEmbyPlayedSync>(nameof(IEmbyPlayedSync) + "RecentlyAdded", "Emby", JobSettingsHelper.EmbyRecentlyAddedSync(s), new Dictionary<string, string> { { JobDataKeys.EmbyRecentlyAddedSearch, "true" } });
await OmbiQuartz.Instance.AddJob<IEmbyEpisodeSync>(nameof(IEmbyEpisodeSync), "Emby", null); await OmbiQuartz.Instance.AddJob<IEmbyEpisodeSync>(nameof(IEmbyEpisodeSync), "Emby", null);
await OmbiQuartz.Instance.AddJob<IEmbyAvaliabilityChecker>(nameof(IEmbyAvaliabilityChecker), "Emby", null); await OmbiQuartz.Instance.AddJob<IEmbyAvaliabilityChecker>(nameof(IEmbyAvaliabilityChecker), "Emby", null);
await OmbiQuartz.Instance.AddJob<IEmbyUserImporter>(nameof(IEmbyUserImporter), "Emby", JobSettingsHelper.UserImporter(s)); await OmbiQuartz.Instance.AddJob<IEmbyUserImporter>(nameof(IEmbyUserImporter), "Emby", JobSettingsHelper.UserImporter(s));

View file

@ -115,15 +115,6 @@
class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Recently class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Recently
Added Sync</button> Added Sync</button>
</div> </div>
<div class="form-group">
<div>
<button mat-raised-button (click)="runPlayedCacher()" type="button" id="playedSync" class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Played Sync</button>
</div>
</div>
<div class="form-group">
<button mat-raised-button (click)="runRecentlyPlayedCacher()" type="button" id="recentlyPlayedSync"
class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Recently Played Sync</button>
</div>
<div class="form-group"> <div class="form-group">
<button mat-raised-button (click)="clearDataAndResync()" type="button" id="clearData" <button mat-raised-button (click)="clearDataAndResync()" type="button" id="clearData"
class="mat-focus-indicator mat-stroked-button mat-button-base"> class="mat-focus-indicator mat-stroked-button mat-button-base">

View file

@ -102,22 +102,6 @@ export class EmbyComponent implements OnInit {
}); });
} }
public runPlayedCacher(): void {
this.jobService.runEmbyPlayedCacher().subscribe(x => {
if(x) {
this.notificationService.success("Triggered the Emby Played Cacher");
}
});
}
public runRecentlyPlayedCacher(): void {
this.jobService.runEmbyRecentlyPlayedCacher().subscribe(x => {
if (x) {
this.notificationService.success("Triggered the Emby Recently Played Sync");
}
});
}
public clearDataAndResync(): void { public clearDataAndResync(): void {
this.jobService.clearMediaserverData().subscribe(x => { this.jobService.clearMediaserverData().subscribe(x => {
if (x) { if (x) {

View file

@ -168,19 +168,6 @@ namespace Ombi.Controllers.V1
return true; return true;
} }
[HttpPost("embyplayedcacher")]
public async Task<bool> StartEmbyPlayedCacher()
{
await OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IEmbyPlayedSync), "Emby"), new JobDataMap(new Dictionary<string, string> { { JobDataKeys.EmbyRecentlyAddedSearch, "false" } }));
return true;
}
[HttpPost("embyrecentlyplayed")]
public async Task<bool> StartEmbyRecentlyPlayedCacher()
{
await OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IEmbyPlayedSync), "Emby"), new JobDataMap(new Dictionary<string, string> { { JobDataKeys.EmbyRecentlyAddedSearch, "true" } }));
return true;
}
/// <summary> /// <summary>
/// Runs a smaller version of the content cacher /// Runs a smaller version of the content cacher
/// </summary> /// </summary>