-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rutracker: use supported 200 categories per search request
- Loading branch information
1 parent
147549c
commit 1a49430
Showing
2 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace Jackett.Common.Extensions | ||
{ | ||
public static class ListExtensions | ||
{ | ||
public static List<List<T>> ChunkBy<T>(this List<T> source, int chunkSize) => source | ||
.Select((x, i) => new { Index = i, Value = x }).GroupBy(x => x.Index / chunkSize) | ||
.Select(x => x.Select(v => v.Value).ToList()).ToList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters