parent
ff048ffcb8
commit
ee227e3b1d
|
@ -1,5 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Concurrent;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
@ -7,11 +7,9 @@ namespace Marr.Data.Reflection
|
||||||
{
|
{
|
||||||
public class SimpleReflectionStrategy : IReflectionStrategy
|
public class SimpleReflectionStrategy : IReflectionStrategy
|
||||||
{
|
{
|
||||||
|
private static readonly ConcurrentDictionary<string, MemberInfo> MemberCache = new ConcurrentDictionary<string, MemberInfo>();
|
||||||
private static readonly Dictionary<string, MemberInfo> MemberCache = new Dictionary<string, MemberInfo>();
|
private static readonly ConcurrentDictionary<string, GetterDelegate> GetterCache = new ConcurrentDictionary<string, GetterDelegate>();
|
||||||
private static readonly Dictionary<string, GetterDelegate> GetterCache = new Dictionary<string, GetterDelegate>();
|
private static readonly ConcurrentDictionary<string, SetterDelegate> SetterCache = new ConcurrentDictionary<string, SetterDelegate>();
|
||||||
private static readonly Dictionary<string, SetterDelegate> SetterCache = new Dictionary<string, SetterDelegate>();
|
|
||||||
|
|
||||||
|
|
||||||
private static MemberInfo GetMember(Type entityType, string name)
|
private static MemberInfo GetMember(Type entityType, string name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,20 +31,22 @@ namespace NzbDrone.Core.Tv
|
||||||
|
|
||||||
private void HandleScanEvents(Series series)
|
private void HandleScanEvents(Series series)
|
||||||
{
|
{
|
||||||
if (series.AddOptions == null)
|
var addOptions = series.AddOptions;
|
||||||
|
|
||||||
|
if (addOptions == null)
|
||||||
{
|
{
|
||||||
_episodeAddedService.SearchForRecentlyAdded(series.Id);
|
_episodeAddedService.SearchForRecentlyAdded(series.Id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Info("[{0}] was recently added, performing post-add actions", series.Title);
|
_logger.Info("[{0}] was recently added, performing post-add actions", series.Title);
|
||||||
_episodeMonitoredService.SetEpisodeMonitoredStatus(series, series.AddOptions);
|
_episodeMonitoredService.SetEpisodeMonitoredStatus(series, addOptions);
|
||||||
|
|
||||||
// If both options are enabled search for the whole series, which will only include monitored episodes.
|
// If both options are enabled search for the whole series, which will only include monitored episodes.
|
||||||
// This way multiple searches for the same season are skipped, though a season that can't be upgraded may be
|
// This way multiple searches for the same season are skipped, though a season that can't be upgraded may be
|
||||||
// searched, but the logs will be more explicit.
|
// searched, but the logs will be more explicit.
|
||||||
|
|
||||||
if (series.AddOptions.SearchForMissingEpisodes && series.AddOptions.SearchForCutoffUnmetEpisodes)
|
if (addOptions.SearchForMissingEpisodes && addOptions.SearchForCutoffUnmetEpisodes)
|
||||||
{
|
{
|
||||||
_commandQueueManager.Push(new SeriesSearchCommand(series.Id));
|
_commandQueueManager.Push(new SeriesSearchCommand(series.Id));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue