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