* make sure aliasNames is not redundant

This commit is contained in:
Reinhard Pointner 2014-10-31 09:07:49 +00:00
parent d8cfabf11e
commit eb228f3d47
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ public class TMDbClient implements MovieIdentificationService {
if (id.getTmdbId() > 0 || id.getImdbId() > 0) { if (id.getTmdbId() > 0 || id.getImdbId() > 0) {
MovieInfo info = getMovieInfo(id, locale, false); MovieInfo info = getMovieInfo(id, locale, false);
String name = info.getName(); String name = info.getName();
String[] aliasNames = info.getOriginalName() == null || info.getOriginalName().isEmpty() ? new String[0] : new String[] { info.getOriginalName() }; String[] aliasNames = info.getOriginalName() == null || info.getOriginalName().isEmpty() || info.getOriginalName().equals(name) ? new String[0] : new String[] { info.getOriginalName() };
int year = info.getReleased().getYear(); int year = info.getReleased().getYear();
int tmdbid = info.getId(); int tmdbid = info.getId();
int imdbid = info.getImdbId() != null ? info.getImdbId() : -1; int imdbid = info.getImdbId() != null ? info.getImdbId() : -1;