using System; using System.Collections.Generic; using System.Linq; namespace NzbDrone.Common { public static class EnumerableExtensions { public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector) { var knownKeys = new HashSet(); return source.Where(element => knownKeys.Add(keySelector(element))); } } }