1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 08:25:02 -04:00

Experiment with unifying Artwork interface for all databases

This commit is contained in:
Reinhard Pointner 2016-04-19 10:05:16 +00:00
parent d616f5ab3f
commit 90ecf3c0a7

View File

@ -45,8 +45,8 @@ public class Artwork implements Serializable {
return url;
}
public String getLanguage() {
return language;
public Locale getLanguage() {
return language == null ? null : new Locale(language);
}
public double getRating() {
@ -54,7 +54,9 @@ public class Artwork implements Serializable {
}
public boolean matches(String... tags) {
return stream(tags).filter(Objects::nonNull).allMatch(tag -> stream(category).anyMatch(tag::equals));
return stream(tags).filter(Objects::nonNull).allMatch(tag -> {
return stream(category).anyMatch(tag::equalsIgnoreCase) || tag.equalsIgnoreCase(language);
});
}
@Override