SxE sets for Episode objects cannot be cached because the same Episode (by ID) may have different episode numbers depending on the order (e.g. Airdate VS DVD order)

This commit is contained in:
Reinhard Pointner 2017-02-17 19:51:28 +08:00
parent 2329104bad
commit 04e8691553
1 changed files with 4 additions and 4 deletions

View File

@ -48,16 +48,16 @@ public enum EpisodeMetrics implements SimilarityMetric {
@Override
protected Collection<SxE> parse(Object object) {
if (object instanceof Movie) {
return emptySet();
}
// SxE sets for Episode objects cannot be cached because the same Episode (by ID) may have different episode numbers depending on the order (e.g. Airdate VS DVD order)
if (object instanceof Episode) {
Episode episode = (Episode) object;
return parse(episode);
}
if (object instanceof Movie) {
return emptySet();
}
return transformCache.computeIfAbsent(object, super::parse);
}