Fix issue with movieCompare

master
Omertron 14 years ago
parent 2867e14bc4
commit 7c6238d749

@ -80,6 +80,7 @@ public class TheMovieDb {
/**
* Get the API key that is to be used
*
* @return
*/
public String getApiKey() {
@ -466,6 +467,7 @@ public class TheMovieDb {
/**
* This method is used to retrieve the newest movie that was added to TMDb.
*
* @return
*/
public MovieDb getLatestMovie() {
@ -491,8 +493,7 @@ public class TheMovieDb {
return false;
}
if (StringUtils.isNotBlank(year)) {
if (StringUtils.isNotBlank(moviedb.getReleaseDate())) {
if (StringUtils.isNotBlank(year) && !year.equalsIgnoreCase("UNKNOWN") && StringUtils.isNotBlank(moviedb.getReleaseDate())) {
// Compare with year
String movieYear = moviedb.getReleaseDate().substring(0, 4);
if (movieYear.equals(year)) {
@ -505,7 +506,7 @@ public class TheMovieDb {
}
}
}
} else {
// Compare without year
if (moviedb.getOriginalTitle().equalsIgnoreCase(title)) {
return true;
@ -514,7 +515,7 @@ public class TheMovieDb {
if (moviedb.getTitle().equalsIgnoreCase(title)) {
return true;
}
}
return false;
}
}

Loading…
Cancel
Save