mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 22:05:00 -05:00
* fail as expected when using undefined {age}
This commit is contained in:
parent
6abb001249
commit
4ea21cd47f
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user