mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -05:00
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.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
|
||||||
@ -103,7 +104,7 @@ public class TMDbTVClient extends AbstractEpisodeListProvider {
|
|||||||
|
|
||||||
SeriesInfo info = new SeriesInfo(this, sortOrder, locale, series.getId());
|
SeriesInfo info = new SeriesInfo(this, sortOrder, locale, series.getId());
|
||||||
info.setName(originalName != null ? originalName : name);
|
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.setStatus(getString(tv, "status"));
|
||||||
info.setLanguage(getString(tv, "original_language"));
|
info.setLanguage(getString(tv, "original_language"));
|
||||||
info.setStartDate(getStringValue(tv, "first_air_date", SimpleDate::parse));
|
info.setStartDate(getStringValue(tv, "first_air_date", SimpleDate::parse));
|
||||||
|
Loading…
Reference in New Issue
Block a user