Updated the episode cacher to have a minimum of 11 hours before it runs again.

pull/470/head
tidusjar 8 years ago
parent 5e090b04b1
commit f8457d1db2

@ -148,7 +148,7 @@ namespace PlexRequests.Services.Jobs
var job = jobs.FirstOrDefault(x => x.Name.Equals(JobNames.EpisodeCacher, StringComparison.CurrentCultureIgnoreCase)); var job = jobs.FirstOrDefault(x => x.Name.Equals(JobNames.EpisodeCacher, StringComparison.CurrentCultureIgnoreCase));
if (job != null) if (job != null)
{ {
if (job.LastRun > DateTime.Now.AddHours(-1)) // If it's been run in the last hour if (job.LastRun > DateTime.Now.AddHours(-11)) // If it's been run in the last 11 hours
{ {
return; return;
} }

@ -33,6 +33,7 @@
<input type="text" class="form-control form-control-custom " id="CouchPotatoCacher" name="CouchPotatoCacher" value="@Model.CouchPotatoCacher"> <input type="text" class="form-control form-control-custom " id="CouchPotatoCacher" name="CouchPotatoCacher" value="@Model.CouchPotatoCacher">
</div> </div>
<small>Please note, the minimum time for this to run is 11 hours, if set below 11 then we will ignore that value. This is a very resource intensive job, the less we run it the better.</small>
<div class="form-group"> <div class="form-group">
<label for="PlexEpisodeCacher" class="control-label">Plex Episode Cacher (hour)</label> <label for="PlexEpisodeCacher" class="control-label">Plex Episode Cacher (hour)</label>
<input type="text" class="form-control form-control-custom " id="PlexEpisodeCacher" name="PlexEpisodeCacher" value="@Model.PlexEpisodeCacher"> <input type="text" class="form-control form-control-custom " id="PlexEpisodeCacher" name="PlexEpisodeCacher" value="@Model.PlexEpisodeCacher">

Loading…
Cancel
Save