private Episode getTVEpisode ( String seriesId , int seasonNbr , int episodeNbr , String language , String episodeType ) throws TvDbException { if ( ! isValidNumber ( seriesId ) || ! isValidNumber ( seasonNbr ) || ! isValidNumber ( episodeNbr ) ) { // Invalid number passed return new Episode ( ) ; } StringBuilder urlBuilder = new StringBuilder ( ) ; urlBuilder . append ( BASE_URL ) . append ( apiKey ) . append ( SERIES_URL ) . append ( seriesId ) . append ( episodeType ) . append ( seasonNbr ) . append ( "/" ) . append ( episodeNbr ) . append ( "/" ) ; if ( StringUtils . isNotBlank ( language ) ) { urlBuilder . append ( language ) . append ( XML_EXTENSION ) ; } LOG . trace ( URL , urlBuilder . toString ( ) ) ; return TvdbParser . getEpisode ( urlBuilder . toString ( ) ) ; }
Generic function to get either the standard TV episode list or the DVD list