SratimPlugin extends ImdbPlugin { @Override public boolean scan(Movie movie) { boolean retval = false; String id = movie.getId(SRATIM_PLUGIN_ID); if (StringTools.isNotValidString(id)) { if (!movie.getMovieType().equals(Movie.TYPE_TVSHOW)) { retval = super.scan(movie); } else { retval = tvdb.scan(movie); } translateGenres(movie); id = getSratimId(movie); } if (StringTools.isValidString(id)) { retval = updateMediaInfo(movie); } return retval; } SratimPlugin(); @Override String getPluginID(); @Override boolean scan(Movie movie); String getSratimId(Movie movie); @Override void scanTVShowTitles(Movie movie); void scanTVShowTitles(Movie movie, String mainXML); void downloadSubtitle(Movie movie, MovieFile mf); boolean downloadSubtitleZip(Movie movie, String subDownloadLink, File subtitleFile, boolean bluray); @Override boolean scanNFO(String nfo, Movie movie); static final String SRATIM_PLUGIN_ID; static final String SRATIM_PLUGIN_SUBTITLE_ID; static final int BCT_L; static final int BCT_R; static final int BCT_N; static final int BCT_EN; static final int BCT_ES; static final int BCT_ET; static final int BCT_CS; }
@Test public void testMovie() { LOG.info("Movie"); Movie movie = new Movie(); movie.addMovieFile(new MovieFile()); movie.setMovieType(Movie.TYPE_MOVIE); movie.setTitle("The Croods", Movie.UNKNOWN); movie.setId(ImdbPlugin.IMDB_PLUGIN_ID, "tt0481499"); OverrideTools.putMoviePriorities(OverrideFlag.DIRECTORS, "sratim,imdb"); sratimPlugin.scan(movie); assertEquals("1123786", movie.getId(SratimPlugin.SRATIM_PLUGIN_ID)); assertEquals("כריס סנדרס", movie.getDirector()); }