@Test public void imdbToTmdb() throws Exception { TmdbSearchResult result = testee.getInfos("tt5895028", MediaIdType.IMDB); assertThat(result.getTmdbId(), is("407806")); assertThat(result.getTitle(), is("13th")); }
public TmdbSearchResult getInfos(String value, MediaIdType idType) throws InfoProviderException { if (idType == MediaIdType.MOVIETITLE) { return fromTitle(value, null); } if (idType == MediaIdType.IMDB) { return fromImdb(value); } if (idType == MediaIdType.TMDB) { return fromTmdb(value); } throw new IllegalArgumentException("Unable to get infos from " + idType); }
TmdbHandler { public TmdbSearchResult getInfos(String value, MediaIdType idType) throws InfoProviderException { if (idType == MediaIdType.MOVIETITLE) { return fromTitle(value, null); } if (idType == MediaIdType.IMDB) { return fromImdb(value); } if (idType == MediaIdType.TMDB) { return fromTmdb(value); } throw new IllegalArgumentException("Unable to get infos from " + idType); } }
TmdbHandler { public TmdbSearchResult getInfos(String value, MediaIdType idType) throws InfoProviderException { if (idType == MediaIdType.MOVIETITLE) { return fromTitle(value, null); } if (idType == MediaIdType.IMDB) { return fromImdb(value); } if (idType == MediaIdType.TMDB) { return fromTmdb(value); } throw new IllegalArgumentException("Unable to get infos from " + idType); }  }
TmdbHandler { public TmdbSearchResult getInfos(String value, MediaIdType idType) throws InfoProviderException { if (idType == MediaIdType.MOVIETITLE) { return fromTitle(value, null); } if (idType == MediaIdType.IMDB) { return fromImdb(value); } if (idType == MediaIdType.TMDB) { return fromTmdb(value); } throw new IllegalArgumentException("Unable to get infos from " + idType); }  TmdbSearchResult getInfos(String value, MediaIdType idType); List<TmdbSearchResult> search(String title, Integer year); }
TmdbHandler { public TmdbSearchResult getInfos(String value, MediaIdType idType) throws InfoProviderException { if (idType == MediaIdType.MOVIETITLE) { return fromTitle(value, null); } if (idType == MediaIdType.IMDB) { return fromImdb(value); } if (idType == MediaIdType.TMDB) { return fromTmdb(value); } throw new IllegalArgumentException("Unable to get infos from " + idType); }  TmdbSearchResult getInfos(String value, MediaIdType idType); List<TmdbSearchResult> search(String title, Integer year);  }