From b95d01193303299c89c8cb540f6b5c0fa5517954 Mon Sep 17 00:00:00 2001 From: jomo Date: Wed, 5 Nov 2014 00:06:15 +0100 Subject: [PATCH] use seconds (as stated in config) timestamps in JS are ms. multiplied config value with 1000 so it's converted to ms --- modules/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/helpers.js b/modules/helpers.js index e1f1b26..d9493ad 100644 --- a/modules/helpers.js +++ b/modules/helpers.js @@ -83,7 +83,7 @@ function get_image_hash(uuid, callback) { if (err) { callback(err, -1, null); } else { - if (details && details.time + config.local_cache_time >= new Date().getTime()) { + if (details && details.time + config.local_cache_time * 1000 >= new Date().getTime()) { // uuid known + recently updated console.log(uuid + " uuid known & recently updated"); callback(null, (details.hash ? 1 : 0), details.hash);