Match by {n} instead of Anime primary title (may be Japanese and not yield results on TheTVDB)

@see https://www.filebot.net/forums/viewtopic.php?f=5&t=3979&p=p22325#p22325
This commit is contained in:
Reinhard Pointner 2016-07-25 01:18:28 +08:00
parent f43a37ed64
commit d424f661ee
1 changed files with 2 additions and 4 deletions

View File

@ -34,14 +34,12 @@ public final class EpisodeUtilities {
public static Episode getEpisodeByAbsoluteNumber(Episode e, EpisodeListProvider service, SortOrder order) throws Exception {
// e.g. match AniDB episode to TheTVDB episode
Set<String> seriesNames = getLenientSeriesNameSet(e);
SeriesInfo seriesInfo = e.getSeriesInfo();
Locale locale = new Locale(seriesInfo.getLanguage());
Locale locale = new Locale(e.getSeriesInfo().getLanguage());
// episode may be a multi-episode
List<Episode> multiEpisode = getMultiEpisodeList(e);
for (SearchResult series : service.search(seriesInfo.getName(), locale)) {
for (SearchResult series : service.search(e.getSeriesName(), locale)) {
// sanity check
if (!series.getEffectiveNames().stream().anyMatch(seriesNames::contains)) {
continue;