* ignore non-series anidb entry types

This commit is contained in:
Reinhard Pointner 2014-06-13 16:42:14 +00:00
parent b87f8fd1e4
commit 12d04c1681
1 changed files with 6 additions and 0 deletions

View File

@ -104,6 +104,12 @@ public class AnidbClient extends AbstractEpisodeListProvider {
// get anime page as xml // get anime page as xml
Document dom = getDocument(url); Document dom = getDocument(url);
// AniDB types: Movie, Music Video, Other, OVA, TV Series, TV Special, Web, unknown
String animeType = selectString("//type", dom);
if (animeType != null && animeType.matches("(?i:music.video|unkown|other)")) {
return new ArrayList<Episode>(0);
}
// select main title and anime start date // select main title and anime start date
SimpleDate seriesStartDate = SimpleDate.parse(selectString("//startdate", dom), "yyyy-MM-dd"); SimpleDate seriesStartDate = SimpleDate.parse(selectString("//startdate", dom), "yyyy-MM-dd");
String animeTitle = selectString("//titles/title[@type='official' and @lang='" + language.getLanguage() + "']", dom); String animeTitle = selectString("//titles/title[@type='official' and @lang='" + language.getLanguage() + "']", dom);