Improve subtitle selection

This commit is contained in:
2023-03-18 18:07:15 +01:00
parent cf64833d3e
commit ba4c1bc1fe
7 changed files with 129 additions and 13 deletions

View File

@@ -42,6 +42,7 @@ public class Config {
private Set<String> forcedKeywords = new HashSet<>(Arrays.asList("forced", "signs", "songs"));
private Set<String> commentaryKeywords = new HashSet<>(Arrays.asList("commentary", "director"));
private Set<String> excludedDirectories = new HashSet<>();
private Set<String> preferredSubtitles = new HashSet<>(Arrays.asList("unstyled"));
private List<AttributeConfig> attributeConfig;

View File

@@ -142,7 +142,7 @@ public abstract class ConfigValidator<FieldType> {
protected Predicate<Method> containsGetterOf(ConfigProperty property) {
return method -> StringUtils.startsWith(method.getName(), "get")
&& StringUtils.containsIgnoreCase(method.getName(), property.prop().replace("-", ""));
&& StringUtils.equalsIgnoreCase(method.getName().replace("get", ""), property.prop().replace("-", ""));
}