fix(ranobedb): prioritize English results (#2133)

This commit is contained in:
James Ward
2026-07-27 20:45:18 -04:00
committed by GitHub
parent edacce6541
commit 068d006dd2
2 changed files with 34 additions and 12 deletions
@@ -308,7 +308,7 @@ public class RanobeDbParser implements BookParser {
RanobedbBookResponse.Release release = book.getReleases().stream()
.filter(Objects::nonNull)
.min(Comparator.comparingInt(r -> "en".equalsIgnoreCase(r.getLang()) ? 1 : -1))
.max(Comparator.comparing(r -> "en".equalsIgnoreCase(r.getLang())))
.orElse(null);
String bookLang = release != null ? release.getLang() : book.getLang();