From d883c39091a46b816ee77f252b847f4711af8959 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 15 Aug 2014 08:16:30 +0000 Subject: [PATCH] Returns a pipe "|" delimited list of alias names if the series has any other names in that language. @see http://www.thetvdb.com/wiki/index.php/API:GetSeries --- source/net/filebot/web/TheTVDBClient.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/web/TheTVDBClient.java b/source/net/filebot/web/TheTVDBClient.java index 024d1192..561f0981 100644 --- a/source/net/filebot/web/TheTVDBClient.java +++ b/source/net/filebot/web/TheTVDBClient.java @@ -102,9 +102,13 @@ public class TheTVDBClient extends AbstractEpisodeListProvider { int sid = getIntegerContent("seriesid", node); String seriesName = getTextContent("SeriesName", node); - List aliasNames = new ArrayList(2); + List aliasNames = new ArrayList(); for (Node aliasNode : selectNodes("AliasNames", node)) { - aliasNames.add(getTextContent(aliasNode)); + for (String aliasName : getTextContent(aliasNode).split("\\|")) { + if (aliasName.trim().length() > 0) { + aliasNames.add(aliasName.trim()); + } + } } if (!resultSet.containsKey(sid)) {