Cleanup
This commit is contained in:
parent
e058e2fa24
commit
2266bfbc1c
@ -177,16 +177,6 @@ public class QueueManager
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var queue = Plugin.Instance.AnalysisQueue;
|
|
||||||
|
|
||||||
// Allocate a new list for each new season
|
|
||||||
if (!queue.ContainsKey(episode.SeasonId))
|
|
||||||
{
|
|
||||||
Plugin.Instance.AnalysisQueue[episode.SeasonId] = new List<QueuedEpisode>();
|
|
||||||
}
|
|
||||||
|
|
||||||
var config = Plugin.Instance!.Configuration;
|
|
||||||
|
|
||||||
// Limit analysis to the first X% of the episode and at most Y minutes.
|
// Limit analysis to the first X% of the episode and at most Y minutes.
|
||||||
// X and Y default to 25% and 10 minutes.
|
// X and Y default to 25% and 10 minutes.
|
||||||
var duration = TimeSpan.FromTicks(episode.RunTimeTicks ?? 0).TotalSeconds;
|
var duration = TimeSpan.FromTicks(episode.RunTimeTicks ?? 0).TotalSeconds;
|
||||||
@ -195,7 +185,7 @@ public class QueueManager
|
|||||||
duration *= analysisPercent;
|
duration *= analysisPercent;
|
||||||
}
|
}
|
||||||
|
|
||||||
duration = Math.Min(duration, 60 * config.AnalysisLengthLimit);
|
duration = Math.Min(duration, 60 * Plugin.Instance!.Configuration.AnalysisLengthLimit);
|
||||||
|
|
||||||
// Allocate a new list for each new season
|
// Allocate a new list for each new season
|
||||||
Plugin.Instance!.AnalysisQueue.TryAdd(episode.SeasonId, new List<QueuedEpisode>());
|
Plugin.Instance!.AnalysisQueue.TryAdd(episode.SeasonId, new List<QueuedEpisode>());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user