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:
parent
6abb001249
commit
4ea21cd47f
@ -181,7 +181,11 @@ public class MediaBindingBean {
|
|||||||
|
|
||||||
@Define("age")
|
@Define("age")
|
||||||
public Number getAgeInDays() {
|
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")
|
@Define("startdate")
|
||||||
|
Loading…
Reference in New Issue
Block a user