Store aliasNames correctly (excluding the primary name)

This commit is contained in:
Reinhard Pointner 2016-03-13 18:31:58 +00:00
parent f2f573563d
commit 3c266b91da
4 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -100,8 +100,8 @@ public class SeriesInfo implements Serializable {
return aliasNames == null ? asList() : asList(aliasNames.clone());
}
public void setAliasNames(List<String> aliasNames) {
this.aliasNames = aliasNames.toArray(new String[aliasNames.size()]);
public void setAliasNames(String... aliasNames) {
this.aliasNames = aliasNames.clone();
}
public List<String> getActors() {

View File

@ -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);

View File

@ -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));