Don't analyze specials & query folder
This commit is contained in:
parent
98f73c3dba
commit
dad7d6dd72
@ -87,6 +87,7 @@ public class Entrypoint : IServerEntryPoint
|
||||
// Get all items from this library. Since intros may change within a season, sort the items before adding them.
|
||||
var folder = _userViewManager.GetUserViews(query)[0];
|
||||
var items = folder.GetItems(new InternalItemsQuery() {
|
||||
ParentId = Guid.Parse(rawId),
|
||||
OrderBy = new [] { ("SortName", SortOrder.Ascending) },
|
||||
IncludeItemTypes = new BaseItemKind[] { BaseItemKind.Episode },
|
||||
Recursive = true,
|
||||
@ -159,6 +160,7 @@ public class Entrypoint : IServerEntryPoint
|
||||
continue;
|
||||
}
|
||||
|
||||
_logger.LogDebug("Accessing libraries as {Username}", user.Username);
|
||||
return user.Id;
|
||||
}
|
||||
|
||||
|
@ -75,8 +75,12 @@ public class FingerprinterTask : IScheduledTask {
|
||||
foreach (var season in queue) {
|
||||
var first = season.Value[0];
|
||||
|
||||
_logger.LogDebug(
|
||||
"Fingerprinting {Count} episodes from {Name} season {Season}",
|
||||
// Don't analyze seasons with <= 1 episode or specials
|
||||
if (season.Value.Count <= 1 || first.SeasonNumber == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
season.Value.Count,
|
||||
first.SeriesName,
|
||||
first.SeasonNumber);
|
||||
@ -89,6 +93,11 @@ public class FingerprinterTask : IScheduledTask {
|
||||
|
||||
for (var i = 0; i < episodes.Count; i += 2)
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
var lhs = episodes[i];
|
||||
var rhs = episodes[i+1];
|
||||
|
||||
@ -120,6 +129,11 @@ public class FingerprinterTask : IScheduledTask {
|
||||
}
|
||||
|
||||
Plugin.Instance!.Configuration.SaveTimestamps();
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
@ -249,7 +263,7 @@ public class FingerprinterTask : IScheduledTask {
|
||||
Plugin.Instance!.Intros[episode] = new Intro()
|
||||
{
|
||||
EpisodeId = episode,
|
||||
Valid = (introStart > 0) && (introEnd > 0),
|
||||
Valid = introEnd > 0,
|
||||
IntroStart = introStart,
|
||||
IntroEnd = introEnd,
|
||||
ShowSkipPromptAt = Math.Max(0, introStart - 5),
|
||||
|
Loading…
x
Reference in New Issue
Block a user