1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

* fail as expected when using undefined {age}

This commit is contained in:
Reinhard Pointner 2014-10-25 09:44:33 +00:00
parent 6abb001249
commit 4ea21cd47f

View File

@ -181,7 +181,11 @@ public class MediaBindingBean {
@Define("age")
public Number getAgeInDays() {
return TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - getReleaseDate().getTimeStamp());
SimpleDate releaseDate = getReleaseDate();
if (releaseDate != null) {
return TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - releaseDate.getTimeStamp());
}
return null;
}
@Define("startdate")