Require a set of distinct files
# Fixes https://www.filebot.net/forums/viewtopic.php?f=6&t=5108
This commit is contained in:
parent
7bbfc3cfa7
commit
cac1d0225f
|
@ -68,19 +68,27 @@ class AutoDetectMatcher implements AutoCompleteMatcher {
|
|||
}
|
||||
|
||||
private List<Match<File, ?>> match(Group group, Collection<File> files, boolean strict, SortOrder order, Locale locale, boolean autodetection, Component parent) throws Exception {
|
||||
for (Type key : group.types()) {
|
||||
switch (key) {
|
||||
case Movie:
|
||||
return movie.match(files, strict, order, locale, autodetection, parent);
|
||||
case Series:
|
||||
return episode.match(files, strict, order, locale, autodetection, parent);
|
||||
case Anime:
|
||||
return anime.match(files, strict, order, locale, autodetection, parent);
|
||||
case Music:
|
||||
return music.match(files, strict, order, locale, autodetection, parent);
|
||||
}
|
||||
AutoCompleteMatcher m = getMatcher(group);
|
||||
if (m != null) {
|
||||
return m.match(files, strict, order, locale, autodetection, parent);
|
||||
}
|
||||
return emptyList();
|
||||
}
|
||||
|
||||
private AutoCompleteMatcher getMatcher(Group group) {
|
||||
for (Type key : group.types()) {
|
||||
switch (key) {
|
||||
case Movie:
|
||||
return movie;
|
||||
case Series:
|
||||
return episode;
|
||||
case Anime:
|
||||
return anime;
|
||||
case Music:
|
||||
return music;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue