* make Movie hashcode/equals case-insensitive

This commit is contained in:
Reinhard Pointner 2012-07-27 07:48:17 +00:00
parent 6b6d7e380d
commit 01d7650e9b
2 changed files with 3 additions and 3 deletions

View File

@ -214,7 +214,7 @@ public class MediaDetection {
}
private static Object getEpisodeIdentifier(CharSequence name, boolean strict) {
public static Object getEpisodeIdentifier(CharSequence name, boolean strict) {
// check SxE first
Object match = new SeasonEpisodeMatcher(SeasonEpisodeMatcher.DEFAULT_SANITY, strict).match(name);

View File

@ -55,7 +55,7 @@ public class Movie extends SearchResult {
return tmdbId == other.tmdbId;
}
return year == other.year && name.equals(other.name);
return year == other.year && name.equalsIgnoreCase(other.name);
}
return false;
@ -70,7 +70,7 @@ public class Movie extends SearchResult {
@Override
public int hashCode() {
return Arrays.hashCode(new Object[] { name, year });
return Arrays.hashCode(new Object[] { name.toLowerCase(), year });
}