pull/733/head
tidusjar 8 years ago
parent d8e7693d8d
commit 5bd8e5f313

@ -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];

@ -39,7 +39,7 @@
<div class="form-group">
<label for="PlexUserChecker" class="control-label">Plex User Checker (hours)</label>
<input type="text" class="form-control form-control-custom " id="PlexUserChecker" name="PlexContentCacher" value="@Model.PlexUserChecker">
<input type="text" class="form-control form-control-custom " id="PlexUserChecker" name="PlexUserChecker" value="@Model.PlexUserChecker">
</div>
<div class="form-group">

Loading…
Cancel
Save