mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 08:18:52 -05:00
Experiment with unifying Artwork interface for all databases
This commit is contained in:
parent
d616f5ab3f
commit
90ecf3c0a7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user