added support for offset when queries seasons in newznab,

This commit is contained in:
kay.one
2013-08-21 21:42:25 -07:00
parent a00587dbd4
commit 227e13d858
15 changed files with 62 additions and 46 deletions

View File

@@ -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)));
}
}
}