This commit is contained in:
tidusjar 2016-12-03 22:04:48 +00:00
parent d8e7693d8d
commit 5bd8e5f313
2 changed files with 20 additions and 3 deletions

View file

@ -950,7 +950,24 @@ namespace PlexRequests.UI.Modules
{
var s = await ScheduledJobSettings.GetSettingsAsync();
var allJobs = await JobRecorder.GetJobsAsync();
var jobsDict = allJobs.ToDictionary(k => k.Name, v => v.LastRun);
var dict = new Dictionary<string, DateTime>();
foreach (var j in allJobs)
{
DateTime dt;
if (dict.TryGetValue(j.Name, out dt))
{
// We already have the key... Somehow, we should have never got this record.
}
else
{
dict.Add(j.Name,j.LastRun);
}
}
var model = new ScheduledJobsViewModel
{
CouchPotatoCacher = s.CouchPotatoCacher,
@ -959,7 +976,7 @@ namespace PlexRequests.UI.Modules
SonarrCacher = s.SonarrCacher,
StoreBackup = s.StoreBackup,
StoreCleanup = s.StoreCleanup,
JobRecorder = jobsDict,
JobRecorder = dict,
RecentlyAddedCron = s.RecentlyAddedCron
};
return View["SchedulerSettings", model];