* exclude episodes without airdate data from ReleaseDate metric matching step

This commit is contained in:
Reinhard Pointner 2012-10-09 15:00:21 +00:00
parent a248021ebf
commit 03cb4febd1
1 changed files with 5 additions and 1 deletions

View File

@ -299,7 +299,11 @@ public enum EpisodeMetrics implements SimilarityMetric {
@Override
public long getTimeStamp(Object object) {
if (object instanceof Episode) {
return ((Episode) object).airdate().getTimeStamp();
try {
return ((Episode) object).airdate().getTimeStamp();
} catch (RuntimeException e) {
return -1; // some episodes may not have airdate defined
}
}
return super.getTimeStamp(object);