diff --git a/source/net/sourceforge/filebot/web/AnidbClient.java b/source/net/sourceforge/filebot/web/AnidbClient.java index 688ebb08..d003d94d 100644 --- a/source/net/sourceforge/filebot/web/AnidbClient.java +++ b/source/net/sourceforge/filebot/web/AnidbClient.java @@ -59,18 +59,7 @@ public class AnidbClient implements EpisodeListProvider { for (Node node : nodes) { Node link = selectNode("./TD[@class='name']/A", node); - // prefer title that is similar to the search query - String title = selectString("./following-sibling::*[@class='match']", link); - - // remove leading and trailing parenthesis - title = title.replaceAll("(^\\()|(\\)$)", ""); - - if (title.isEmpty()) { - // fallback: use main title - title = getTextContent(link); - } - - // anime page + String title = getTextContent(link); String href = getAttribute("href", link); try { diff --git a/test/net/sourceforge/filebot/web/AnidbClientTest.java b/test/net/sourceforge/filebot/web/AnidbClientTest.java index 871a1a7d..e0876a1a 100644 --- a/test/net/sourceforge/filebot/web/AnidbClientTest.java +++ b/test/net/sourceforge/filebot/web/AnidbClientTest.java @@ -72,9 +72,9 @@ public class AnidbClientTest { @Test - public void searchReturnMatchingTitle() throws Exception { - // Seikai no Senki (main title), Banner of the Stars (official english title) - assertEquals("Banner of the Stars", anidb.search("banner of the stars").get(0).getName()); + public void searchTitleAlias() throws Exception { + // Seikai no Senki (main title), Banner of the Stars (official English title) + assertEquals("Seikai no Senki", anidb.search("banner of the stars").get(0).getName()); assertEquals("Seikai no Senki", anidb.search("seikai no senki").get(0).getName()); // no matching title