@@ -786,6 +789,11 @@
});
},
+ profile: function(event) {
+ this.$.profile.user = this.user;
+ this.mode = "profile";
+ },
+
logout: function(event) {
this.path = "";
window.fetch("api/v1/users/logout", function(error, xhr) {
diff --git a/package.json b/package.json
index 1771921..7c7979d 100644
--- a/package.json
+++ b/package.json
@@ -13,13 +13,13 @@
"author": "James Ketrenos",
"license": "Apache-2.0",
"dependencies": {
- "bluebird": "^3.5.1",
- "body-parser": "^1.18.2",
- "config": "^1.28.1",
+ "bluebird": "^3.5.3",
+ "body-parser": "^1.18.3",
+ "config": "^1.31.0",
"connect-sqlite3": "^0.9.11",
"cookie-parser": "^1.4.3",
"exif-reader": "github:paras20xx/exif-reader",
- "express": "^4.16.2",
+ "express": "^4.16.4",
"express-session": "^1.15.6",
"face-recognition": "^0.9.4",
"handlebars": "^4.0.12",
@@ -27,14 +27,14 @@
"mariasql": "^0.2.6",
"moment": "^2.22.2",
"moment-holiday": "^1.5.1",
- "morgan": "^1.9.0",
- "mustache": "^3.0.0",
- "nodemailer": "^4.6.8",
- "qs": "^6.5.2",
- "sequelize": "^4.28.6",
+ "morgan": "^1.9.1",
+ "mustache": "^3.0.1",
+ "nodemailer": "^4.7.0",
+ "qs": "^6.6.0",
+ "sequelize": "^4.41.2",
"sequelize-mysql": "^1.7.0",
- "sharp": "^0.20.5",
- "sqlite3": "^4.0.2"
+ "sharp": "^0.20.8",
+ "sqlite3": "^4.0.4"
},
"jshintConfig": {
"undef": true,
diff --git a/server/scanner.js b/server/scanner.js
index cd80d59..46194ff 100755
--- a/server/scanner.js
+++ b/server/scanner.js
@@ -233,7 +233,7 @@ function processBlock(items) {
}
/* Even if the hash doesn't need to be updated, the entry needs to be scanned */
- console.log("process needed because of " + query);
+// console.log("process needed because of " + query);
needsProcessing.push(asset);
if (!query) {
@@ -394,7 +394,7 @@ function processBlock(items) {
}
});
}).catch(function(error) {
- setStatus("Error processing file. Continuing.");
+ setStatus("Error processing file. Continuing.", "error");
throw error;
}).then(function() {
setStatus("Completed processing queue. Marking " + duplicates.length + " duplicates.");
@@ -616,10 +616,17 @@ function computeHash(filepath) {
return new Promise(function(resolve, reject) {
let input = fs.createReadStream(filepath),
hash = crypto.createHash("sha256");
+
if (!input) {
+ console.warn("Unable to open " + filepath);
return reject();
}
+ input.on("error", function(error) {
+ console.warn("Error reading " + filepath);
+ reject(error);
+ });
+
input.on("readable", function() {
const data = input.read();
if (data) {
@@ -725,9 +732,9 @@ function doScan() {
newEntries++;
}
if (!asset.scanned || asset.scanned < asset.stats.mtime || !asset.modified) {
- if (!asset.scanned) { console.log("no scan date on asset"); }
- if (asset.scanned < asset.stats.mtime) { console.log("scan date older than mtime"); }
- if (!asset.modified) { console.log("no mtime."); }
+// if (!asset.scanned) { console.log("no scan date on asset"); }
+// if (asset.scanned < asset.stats.mtime) { console.log("scan date older than mtime"); }
+// if (!asset.modified) { console.log("no mtime."); }
needsProcessing.push(asset);
} else {
updateScanned.push(asset.id);