From 6c1bbae43161dbac1b4ddffcb0f614ce0f60f1a9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 28 May 2015 16:39:57 +0000 Subject: [PATCH] * only recognize positive {age} (in days) values --- source/net/filebot/format/MediaBindingBean.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index e07398ab..1a2929b7 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -185,7 +185,10 @@ public class MediaBindingBean { public Number getAgeInDays() { SimpleDate releaseDate = getReleaseDate(); if (releaseDate != null) { - return TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - releaseDate.getTimeStamp()); + long days = TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - releaseDate.getTimeStamp()); + if (days >= 0) { + return days; + } } return null; }