mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 06:15:02 -05:00
* since changing the search url, we only get shows, no additional checks necessary
This commit is contained in:
parent
91a353624c
commit
a94cedd601
@ -61,20 +61,15 @@ public class TVDotComClient extends EpisodeListClient {
|
|||||||
List<SearchResult> searchResults = new ArrayList<SearchResult>(nodes.size());
|
List<SearchResult> searchResults = new ArrayList<SearchResult>(nodes.size());
|
||||||
|
|
||||||
for (Node node : nodes) {
|
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
|
try {
|
||||||
if (category.toLowerCase().startsWith("show")) {
|
String episodeListingUrl = href.replaceFirst(Pattern.quote("summary.html?") + ".*", "episode_listings.html");
|
||||||
String title = node.getTextContent();
|
|
||||||
String href = XPathUtil.selectString("@href", node);
|
|
||||||
|
|
||||||
try {
|
searchResults.add(new HyperLink(title, episodeListingUrl));
|
||||||
String episodeListingUrl = href.replaceFirst(Pattern.quote("summary.html?") + ".*", "episode_listings.html");
|
} 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user