From a94cedd601fde613ce088f37227a475c5f64a3d8 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 6 Jul 2008 11:29:55 +0000 Subject: [PATCH] * since changing the search url, we only get shows, no additional checks necessary --- .../filebot/web/TVDotComClient.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/source/net/sourceforge/filebot/web/TVDotComClient.java b/source/net/sourceforge/filebot/web/TVDotComClient.java index d5a4eca7..68bc95d1 100644 --- a/source/net/sourceforge/filebot/web/TVDotComClient.java +++ b/source/net/sourceforge/filebot/web/TVDotComClient.java @@ -61,20 +61,15 @@ public class TVDotComClient extends EpisodeListClient { List searchResults = new ArrayList(nodes.size()); for (Node node : nodes) { - String category = node.getParentNode().getTextContent(); + String title = node.getTextContent(); + String href = XPathUtil.selectString("@href", node); - // we only want search results that are shows - if (category.toLowerCase().startsWith("show")) { - String title = node.getTextContent(); - String href = XPathUtil.selectString("@href", node); + try { + String episodeListingUrl = href.replaceFirst(Pattern.quote("summary.html?") + ".*", "episode_listings.html"); - try { - String episodeListingUrl = href.replaceFirst(Pattern.quote("summary.html?") + ".*", "episode_listings.html"); - - searchResults.add(new HyperLink(title, episodeListingUrl)); - } catch (URISyntaxException e) { - Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid href: " + href, e); - } + searchResults.add(new HyperLink(title, episodeListingUrl)); + } catch (URISyntaxException e) { + Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid href: " + href, e); } }