- Added a visual indication on the UI to tell the admin there is a update available.

- We are now also recording the last scheduled run in the database
This commit is contained in:
tidusjar 2016-04-29 14:08:30 +01:00
commit df3dc4ac04
28 changed files with 392 additions and 45 deletions

View file

@ -47,7 +47,7 @@ namespace PlexRequests.Services.Jobs
public class PlexAvailabilityChecker : IJob, IAvailabilityChecker
{
public PlexAvailabilityChecker(ISettingsService<PlexSettings> plexSettings, ISettingsService<AuthenticationSettings> auth, IRequestService request, IPlexApi plex, ICacheProvider cache,
INotificationService notify)
INotificationService notify, IJobRecord rec)
{
Plex = plexSettings;
Auth = auth;
@ -55,6 +55,7 @@ namespace PlexRequests.Services.Jobs
PlexApi = plex;
Cache = cache;
Notification = notify;
Job = rec;
}
private ISettingsService<PlexSettings> Plex { get; }
@ -64,6 +65,7 @@ namespace PlexRequests.Services.Jobs
private IPlexApi PlexApi { get; }
private ICacheProvider Cache { get; }
private INotificationService Notification { get; }
private IJobRecord Job { get; }
public void CheckAndUpdateAll()
{
@ -144,6 +146,8 @@ namespace PlexRequests.Services.Jobs
RequestService.BatchUpdate(modifiedModel);
}
Job.Record(JobNames.PlexChecker);
}
public List<PlexMovie> GetPlexMovies()