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:
parent
2329104bad
commit
04e8691553
|
@ -48,16 +48,16 @@ public enum EpisodeMetrics implements SimilarityMetric {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Collection<SxE> parse(Object object) {
|
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)
|
// 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) {
|
if (object instanceof Episode) {
|
||||||
Episode episode = (Episode) object;
|
Episode episode = (Episode) object;
|
||||||
return parse(episode);
|
return parse(episode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (object instanceof Movie) {
|
||||||
|
return emptySet();
|
||||||
|
}
|
||||||
|
|
||||||
return transformCache.computeIfAbsent(object, super::parse);
|
return transformCache.computeIfAbsent(object, super::parse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue