Preserve alias names as best as possible from all fields
This commit is contained in:
parent
af5e0ffd55
commit
eaa146bd0a
|
@ -13,6 +13,7 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
|
@ -103,7 +104,7 @@ public class TMDbTVClient extends AbstractEpisodeListProvider {
|
|||
|
||||
SeriesInfo info = new SeriesInfo(this, sortOrder, locale, series.getId());
|
||||
info.setName(originalName != null ? originalName : name);
|
||||
info.setAliasNames(series.getAliasNames());
|
||||
info.setAliasNames(Stream.concat(Stream.of(series.getName(), originalName), Stream.of(series.getAliasNames())).filter(Objects::nonNull).filter(s -> !s.equals(name)).distinct().toArray(String[]::new));
|
||||
info.setStatus(getString(tv, "status"));
|
||||
info.setLanguage(getString(tv, "original_language"));
|
||||
info.setStartDate(getStringValue(tv, "first_air_date", SimpleDate::parse));
|
||||
|
|
Loading…
Reference in New Issue