1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

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

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;