FanartTvPlugin { public boolean scan(Movie movie) { return scan(movie, null); } FanartTvPlugin(); boolean scan(Movie movie); boolean scan(Movie movie, final FTArtworkType artworkType); FTSeries getTvArtwork(int tvdbId); FTMovie getMovieArtwork(int tmdbId, String imdbId); static boolean isArtworkRequired(FTArtworkType requiredType); static boolean isArtworkRequired(String artworkType); static final String FANARTTV_PLUGIN_ID; }
@Test public void testScanMovie() { LOG.info("scan (movie)"); Movie movie = new Movie(); movie.setId(ImdbPlugin.IMDB_PLUGIN_ID, "tt0499549"); movie.setId(TheMovieDbPlugin.TMDB_PLUGIN_ID, "19995"); movie.setBaseName("TEST - Avatar"); boolean expResult = true; boolean result = ft.scan(movie); assertEquals("Failed to scan for fanart", expResult, result); assertTrue("No MovieArt found", StringTools.isValidString(movie.getClearArtURL())); assertTrue("No MovieLogo found", StringTools.isValidString(movie.getClearLogoURL())); assertTrue("No MovieDisc found", StringTools.isValidString(movie.getMovieDiscURL())); }
@Test public void testScanTV() { LOG.info("scan (TV)"); Movie movie = new Movie(); movie.setBaseName("TEST - Walking Dead"); movie.setId(ImdbPlugin.IMDB_PLUGIN_ID, "tt1520211"); movie.setId(TheTvDBPlugin.THETVDB_PLUGIN_ID, "153021"); MovieFile mf = new MovieFile(); mf.setSeason(1); mf.setFirstPart(1); mf.setLastPart(1); movie.addMovieFile(mf); boolean expResult = true; boolean result = ft.scan(movie); assertEquals("Failed to scan for fanart", expResult, result); assertTrue("No ClearArt found", StringTools.isValidString(movie.getClearArtURL())); assertTrue("No ClearLogo found", StringTools.isValidString(movie.getClearLogoURL())); assertTrue("No TVThumb found", StringTools.isValidString(movie.getTvThumbURL())); assertTrue("No SeasonThumbfound", StringTools.isValidString(movie.getSeasonThumbURL())); }