diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/changes/changes.js | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/modules/changes/changes.js b/modules/changes/changes.js index 3c75671..d4c48e2 100644 --- a/modules/changes/changes.js +++ b/modules/changes/changes.js @@ -143,21 +143,30 @@ function refreshURLs(cb){ fetch("GET",url,function(url,status,body){ nwaiting--; console.log("Got <"+url+">; status = "+status); + var dosave=true; if(status==-1){ hashes[url]=[new Date(),null,null]; } else { var hash=crypto.createHash("sha256"); hash.update(body); - hashes[url]=[new Date(),hash.digest("hex"),body]; + var res=hash.digest("hex"); + hashes[url]=[new Date(),res,body]; + if(url=="http://www.rolandvdv.nl/M17/"&& + res=="6c09a3f77e8a1ce36ffdf1bf0cff8aa9bb5c17616ba8f31db31d8b5946245362"){ + console.log("ROLAND IS WEER BEZIG"); + dosave=false; + } } - if(!urls[url]){ - console.log("WARNING: url <"+url+"> from hashes not found in urls!"); - } else { - //var last=urls[url].timeline[urls[url].timeline.length-1]; - //if(last==undefined||hashes[url][1]==null||hashes[url][1]!=last[1]){ - urls[url].timeline.push(hashes[url]); - //} + if(dosave){ + if(!urls[url]){ + console.log("WARNING: url <"+url+"> from hashes not found in urls!"); + } else { + //var last=urls[url].timeline[urls[url].timeline.length-1]; + //if(last==undefined||hashes[url][1]==null||hashes[url][1]!=last[1]){ + urls[url].timeline.push(hashes[url]); + //} + } } if(nwaiting==0&&cb)process.nextTick(cb); |