pull/3689/head
Jamie Rees 4 years ago
commit b1b48c106a

@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Quartz;
using Quartz.Impl;
using Quartz.Impl.Matchers;
using Quartz.Spi;
namespace Ombi.Helpers

@ -66,11 +66,13 @@ namespace Ombi.Schedule.Jobs.Emby
public async Task Execute(IJobExecutionContext job)
{
_log.LogInformation("Starting Emby Availability Check");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Emby Availability Checker Started");
await ProcessMovies();
await ProcessTv();
_log.LogInformation("Finished Emby Availability Check");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Emby Availability Checker Finished");
}

@ -77,6 +77,7 @@ namespace Ombi.Schedule.Jobs.Emby
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Emby Episode Sync Finished");
_logger.LogInformation("Emby Episode Sync Finished - Triggering Metadata refresh");
await OmbiQuartz.TriggerJob(nameof(IRefreshMetadata), "System");
}

@ -75,13 +75,14 @@ namespace Ombi.Schedule.Jobs.Ombi
}
catch (Exception e)
{
_log.LogError(e, "Exception when refreshing the Plex Metadata");
_log.LogError(e, $"Exception when refreshing the Metadata Refresh");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Metadata Refresh Failed");
throw;
return;
}
_log.LogInformation("Metadata refresh finished");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Metadata Refresh Finished");
}

@ -63,7 +63,8 @@ namespace Ombi.Schedule.Jobs.Plex
_log.LogError(LoggingEvents.Cacher, e, "Caching Episodes Failed");
}
_log.LogInformation("Plex Episode Sync Finished - Triggering Metadata refresh");
await OmbiQuartz.TriggerJob(nameof(IRefreshMetadata), "System");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)

@ -11,7 +11,6 @@
public string AutomaticUpdater { get; set; }
public string UserImporter { get; set; }
public string SickRageSync { get; set; }
public string RefreshMetadata { get; set; }
public string Newsletter { get; set; }
public string LidarrArtistSync { get; set; }
public string IssuesPurge { get; set; }

@ -56,11 +56,6 @@ namespace Ombi.Settings.Settings.Models
return ValidateCron(Get(s.SickRageSync, Cron.Hourly(35)));
}
public static string RefreshMetadata(JobSettings s)
{
return ValidateCron(Get(s.RefreshMetadata, Cron.DayInterval(3)));
}
public static string LidarrArtistSync(JobSettings s)
{
return ValidateCron(Get(s.LidarrArtistSync, Cron.Hourly(40)));

@ -140,7 +140,6 @@ export interface IJobSettings {
automaticUpdater: string;
userImporter: string;
sickRageSync: string;
refreshMetadata: string;
newsletter: string;
plexRecentlyAddedSync: string;
lidarrArtistSync: string;

@ -84,14 +84,6 @@
<small *ngIf="form.get('userImporter').hasError('required')" class="error-text">The User Importer is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('userImporter')?.value)">Test</button>
</div>
<div class="form-group">
<label for="userImporter" class="control-label">Refresh Metadata</label>
<input type="text" class="form-control form-control-custom" [ngClass]="{'form-error': form.get('refreshMetadata').hasError('required')}" id="refreshMetadata" name="refreshMetadata" formControlName="refreshMetadata">
<small *ngIf="form.get('refreshMetadata').hasError('required')" class="error-text">The Refresh Metadata is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('refreshMetadata')?.value)">Test</button>
</div>
<div class="form-group">
<label for="userImporter" class="control-label">Newsletter</label>

@ -28,7 +28,6 @@ export class JobsComponent implements OnInit {
sonarrSync: [x.sonarrSync, Validators.required],
radarrSync: [x.radarrSync, Validators.required],
sickRageSync: [x.sickRageSync, Validators.required],
refreshMetadata: [x.refreshMetadata, Validators.required],
newsletter: [x.newsletter, Validators.required],
plexRecentlyAddedSync: [x.plexRecentlyAddedSync, Validators.required],
lidarrArtistSync: [x.lidarrArtistSync, Validators.required],

@ -569,7 +569,6 @@ namespace Ombi.Controllers.V1
j.PlexContentSync = j.PlexContentSync.HasValue() ? j.PlexContentSync : JobSettingsHelper.PlexContent(j);
j.UserImporter = j.UserImporter.HasValue() ? j.UserImporter : JobSettingsHelper.UserImporter(j);
j.SickRageSync = j.SickRageSync.HasValue() ? j.SickRageSync : JobSettingsHelper.SickRageSync(j);
j.RefreshMetadata = j.RefreshMetadata.HasValue() ? j.RefreshMetadata : JobSettingsHelper.RefreshMetadata(j);
j.PlexRecentlyAddedSync = j.PlexRecentlyAddedSync.HasValue() ? j.PlexRecentlyAddedSync : JobSettingsHelper.PlexRecentlyAdded(j);
j.Newsletter = j.Newsletter.HasValue() ? j.Newsletter : JobSettingsHelper.Newsletter(j);
j.LidarrArtistSync = j.LidarrArtistSync.HasValue() ? j.LidarrArtistSync : JobSettingsHelper.LidarrArtistSync(j);

@ -78,7 +78,7 @@
<meta name="description" content="Ombi, media request tool">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@appName</title>
<meta property="og:title" content=“@appName” />
<meta property="og:title" content="@appName" />
<meta property="og:image" content="~/images/logo.png" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">

Loading…
Cancel
Save