+ private static Comparator<Result> sortRepacksFirst() {
+ return preferredComparator(matches("\\.(PROPER|REPACK)\\."), (result) -> result.pack().name());
+ }
+
+ private static Comparator<Result> sortPacksAlphabetically() {
+ return new Comparator<Result>() {
+ @Override
+ public int compare(Result leftResult, Result rightResult) {
+ return leftResult.pack().name().compareToIgnoreCase(rightResult.pack().name());
+ }
+ };
+ }
+
+ /** Comparator that sorts bots with running downloads to the back of the list. */
+ private final Comparator<Result> botsWithRunningTransfersComparator = new Comparator<Result>() {