mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Added a button to clear the media data and resync
This commit is contained in:
parent
8832ae793a
commit
1527cbb79a
10 changed files with 64 additions and 7 deletions
|
@ -43,6 +43,10 @@ export class JobService extends ServiceHelpers {
|
||||||
return this.http.post<boolean>(`${this.url}plexrecentlyadded/`, {headers: this.headers});
|
return this.http.post<boolean>(`${this.url}plexrecentlyadded/`, {headers: this.headers});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public clearMediaserverData(): Observable<boolean> {
|
||||||
|
return this.http.post<boolean>(`${this.url}clearmediaserverdata/`, {headers: this.headers});
|
||||||
|
}
|
||||||
|
|
||||||
public runEmbyCacher(): Observable<boolean> {
|
public runEmbyCacher(): Observable<boolean> {
|
||||||
return this.http.post<boolean>(`${this.url}embycontentcacher/`, {headers: this.headers});
|
return this.http.post<boolean>(`${this.url}embycontentcacher/`, {headers: this.headers});
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,12 @@
|
||||||
<button mat-raised-button (click)="runCacher()" type="button" id="save" class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Cacher</button>
|
<button mat-raised-button (click)="runCacher()" type="button" id="save" class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Cacher</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button mat-raised-button (click)="clearDataAndResync()" type="button" id="clearData"
|
||||||
|
class="mat-focus-indicator mat-stroked-button mat-button-base">
|
||||||
|
Clear Data And Resync
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -92,4 +92,12 @@ export class EmbyComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public clearDataAndResync(): void {
|
||||||
|
this.jobService.clearMediaserverData().subscribe(x => {
|
||||||
|
if (x) {
|
||||||
|
this.notificationService.success("Triggered the Clear MediaServer Resync");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,12 @@
|
||||||
<button mat-raised-button (click)="runCacher()" type="button" id="save" class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Cacher</button>
|
<button mat-raised-button (click)="runCacher()" type="button" id="save" class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Cacher</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button mat-raised-button (click)="clearDataAndResync()" type="button" id="clearData"
|
||||||
|
class="mat-focus-indicator mat-stroked-button mat-button-base">
|
||||||
|
Clear Data And Resync
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -93,4 +93,12 @@ export class JellyfinComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public clearDataAndResync(): void {
|
||||||
|
this.jobService.clearMediaserverData().subscribe(x => {
|
||||||
|
if (x) {
|
||||||
|
this.notificationService.success("Triggered the Clear MediaServer Resync");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<settings-menu></settings-menu>
|
<settings-menu></settings-menu>
|
||||||
<wiki [path]="'/settings/scheduled-tasks/'"></wiki>
|
<wiki [path]="'settings/jobs/'"></wiki>
|
||||||
<div *ngIf="form" class="small-middle-container">
|
<div *ngIf="form" class="small-middle-container">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Job Settings</legend>
|
<legend>Job Settings</legend>
|
||||||
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
||||||
<small>Changes require a restart.</small><p>
|
<small>Changes require a restart.</small><p>
|
||||||
<small>You can generate valid CRON Expressions here: <a href="https://www.cronmaker.com/" target="_blank">https://www.cronmaker.com/</a></small>
|
<small>You can generate valid CRON Expressions here: <a href="http://www.cronmaker.com/" target="_blank">https://www.cronmaker.com/</a></small>
|
||||||
<div style="margin-top:1em;">
|
<div style="margin-top:1em;">
|
||||||
<div class="form-group cronBox">
|
<div class="form-group cronBox">
|
||||||
<mat-form-field appearance="outline" floatLabel=always>
|
<mat-form-field appearance="outline" floatLabel=always>
|
||||||
|
|
|
@ -158,15 +158,21 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button mat-raised-button (click)="runCacher()" type="button" id="save"
|
<button mat-raised-button (click)="runCacher()" type="button" id="fullSync"
|
||||||
class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Full
|
class="mat-focus-indicator mat-stroked-button mat-button-base">Manually Run Full
|
||||||
Sync</button><br />
|
Sync</button><br />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button mat-raised-button (click)="runRecentlyAddedCacher()" type="button" id="save"
|
<button mat-raised-button (click)="runRecentlyAddedCacher()" type="button" id="recentlyAddedSync"
|
||||||
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">
|
||||||
|
<button mat-raised-button (click)="clearDataAndResync()" type="button" id="clearData"
|
||||||
|
class="mat-focus-indicator mat-stroked-button mat-button-base">
|
||||||
|
Clear Data And Resync
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|
|
@ -73,7 +73,6 @@ export class PlexComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
public addTab(event: MatTabChangeEvent) {
|
public addTab(event: MatTabChangeEvent) {
|
||||||
|
|
||||||
const tabName = event.tab.textLabel;
|
const tabName = event.tab.textLabel;
|
||||||
if (tabName == "Add Server"){
|
if (tabName == "Add Server"){
|
||||||
|
|
||||||
|
@ -146,6 +145,14 @@ export class PlexComponent implements OnInit, OnDestroy {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public clearDataAndResync(): void {
|
||||||
|
this.jobService.clearMediaserverData().subscribe(x => {
|
||||||
|
if (x) {
|
||||||
|
this.notificationService.success("Triggered the Clear MediaServer Resync");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.subscriptions.next();
|
this.subscriptions.next();
|
||||||
this.subscriptions.complete();
|
this.subscriptions.complete();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div *ngIf="!text" class="col-md-4 ml-auto ">
|
<div *ngIf="!text" class="col-md-4 ml-auto ">
|
||||||
<a href="{{domain}}{{url}}" target="_blank">
|
<a href="{{domain}}{{url}}" target="_blank">
|
||||||
<button mat-raised-button color="accent">
|
<button mat-raised-button color="accent">
|
||||||
<span>Wiki</span>
|
<span>Docs</span>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,6 +9,7 @@ using Ombi.Schedule.Jobs.Emby;
|
||||||
using Ombi.Schedule.Jobs.Jellyfin;
|
using Ombi.Schedule.Jobs.Jellyfin;
|
||||||
using Ombi.Schedule.Jobs.Ombi;
|
using Ombi.Schedule.Jobs.Ombi;
|
||||||
using Ombi.Schedule.Jobs.Plex;
|
using Ombi.Schedule.Jobs.Plex;
|
||||||
|
using Ombi.Schedule.Jobs.Plex.Interfaces;
|
||||||
using Ombi.Schedule.Jobs.Radarr;
|
using Ombi.Schedule.Jobs.Radarr;
|
||||||
using Quartz;
|
using Quartz;
|
||||||
|
|
||||||
|
@ -125,6 +126,17 @@ namespace Ombi.Controllers.V1
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clear out the media server and resync
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("clearmediaserverdata")]
|
||||||
|
public bool ClearMediaServerData()
|
||||||
|
{
|
||||||
|
OmbiQuartz.Scheduler.TriggerJob(new JobKey(nameof(IMediaDatabaseRefresh), "System"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs a smaller version of the content cacher
|
/// Runs a smaller version of the content cacher
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue