From 3c266b91dac96ce9bc8cb842a1805dde9f78a85c Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 13 Mar 2016 18:31:58 +0000 Subject: [PATCH] Store aliasNames correctly (excluding the primary name) --- source/net/filebot/web/AnidbClient.java | 2 +- source/net/filebot/web/SeriesInfo.java | 4 ++-- source/net/filebot/web/TVMazeClient.java | 2 +- source/net/filebot/web/TheTVDBClient.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/net/filebot/web/AnidbClient.java b/source/net/filebot/web/AnidbClient.java index 5b72cb00..d6bc5c3a 100644 --- a/source/net/filebot/web/AnidbClient.java +++ b/source/net/filebot/web/AnidbClient.java @@ -112,7 +112,7 @@ public class AnidbClient extends AbstractEpisodeListProvider { // parse series info SeriesInfo seriesInfo = new SeriesInfo(getName(), sortOrder, locale, anime.getId()); - seriesInfo.setAliasNames(searchResult.getEffectiveNames()); + seriesInfo.setAliasNames(searchResult.getAliasNames()); // AniDB types: Movie, Music Video, Other, OVA, TV Series, TV Special, Web, unknown String animeType = selectString("//type", dom); diff --git a/source/net/filebot/web/SeriesInfo.java b/source/net/filebot/web/SeriesInfo.java index 79d730ef..b16b3e7d 100644 --- a/source/net/filebot/web/SeriesInfo.java +++ b/source/net/filebot/web/SeriesInfo.java @@ -100,8 +100,8 @@ public class SeriesInfo implements Serializable { return aliasNames == null ? asList() : asList(aliasNames.clone()); } - public void setAliasNames(List aliasNames) { - this.aliasNames = aliasNames.toArray(new String[aliasNames.size()]); + public void setAliasNames(String... aliasNames) { + this.aliasNames = aliasNames.clone(); } public List getActors() { diff --git a/source/net/filebot/web/TVMazeClient.java b/source/net/filebot/web/TVMazeClient.java index 251960e9..e66c3da1 100644 --- a/source/net/filebot/web/TVMazeClient.java +++ b/source/net/filebot/web/TVMazeClient.java @@ -76,7 +76,7 @@ public class TVMazeClient extends AbstractEpisodeListProvider { SeriesInfo seriesInfo = new SeriesInfo(getName(), sortOrder, locale, show.getId()); seriesInfo.setName(show.getName()); - seriesInfo.setAliasNames(show.getEffectiveNames()); + seriesInfo.setAliasNames(show.getAliasNames()); seriesInfo.setStatus(status); seriesInfo.setRuntime(runtime); seriesInfo.setStartDate(premiered); diff --git a/source/net/filebot/web/TheTVDBClient.java b/source/net/filebot/web/TheTVDBClient.java index 3931183e..f5119771 100644 --- a/source/net/filebot/web/TheTVDBClient.java +++ b/source/net/filebot/web/TheTVDBClient.java @@ -134,7 +134,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider { // parse series info Node seriesNode = selectNode("Data/Series", dom); TheTVDBSeriesInfo seriesInfo = new TheTVDBSeriesInfo(getName(), sortOrder, locale, series.getId()); - seriesInfo.setAliasNames(searchResult.getEffectiveNames()); + seriesInfo.setAliasNames(searchResult.getAliasNames()); seriesInfo.setName(getTextContent("SeriesName", seriesNode)); seriesInfo.setAirsDayOfWeek(getTextContent("Airs_DayOfWeek", seriesNode));