parent
a00587dbd4
commit
227e13d858
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace NzbDrone.Common
|
||||
{
|
||||
public static class IEnumerableExtensions
|
||||
{
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
|
||||
{
|
||||
var knownKeys = new HashSet<TKey>();
|
||||
|
||||
return source.Where(element => knownKeys.Add(keySelector(element)));
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public class PartialSeasonSearchCriteria : SeasonSearchCriteria
|
||||
{
|
||||
public int Prefix { get; set; }
|
||||
|
||||
public PartialSeasonSearchCriteria(SeasonSearchCriteria seasonSearch, int prefix)
|
||||
{
|
||||
Prefix = prefix;
|
||||
SceneTitle = seasonSearch.SceneTitle;
|
||||
SeasonNumber = seasonSearch.SeasonNumber;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0} : S{1:00}E{2:0}*]", SceneTitle, SeasonNumber, Prefix);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue