fix(ranobedb): prioritize English results (#2133)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user