mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Fixed #718
This commit is contained in:
parent
d8e7693d8d
commit
5bd8e5f313
2 changed files with 20 additions and 3 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue