From 5bd6c8f5535615f6f4d27472988c547a5fa37d3a Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 24 Jan 2022 16:53:35 -0600 Subject: [PATCH] Update njodb version --- package-lock.json | 8 ++++---- package.json | 6 +++--- server/Db.js | 7 ++++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2d73f74..3ae408fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf", - "version": "1.6.53", + "version": "1.6.59", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1255,9 +1255,9 @@ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "njodb": { - "version": "0.4.27", - "resolved": "https://registry.npmjs.org/njodb/-/njodb-0.4.27.tgz", - "integrity": "sha512-2VWnqv953eQPtly9FDREcikF1sB9mcqAlzcmjHXR0L0my8Xvo4ctMShmwU2W1YpKdtDgFxsqF/S1a4vtv/MzjQ==", + "version": "0.4.29", + "resolved": "https://registry.npmjs.org/njodb/-/njodb-0.4.29.tgz", + "integrity": "sha512-t9zCtrt9jZcpMYyqjtTi7+jea/y9TA6ZhHj9AkZh4pf1cJ2UYNz2EZgCifS4Izwu6R4ypaCblMgU3EwjZgTp2Q==", "requires": { "proper-lockfile": "^4.1.2" } diff --git a/package.json b/package.json index 7517cbcc..7cb02c4f 100644 --- a/package.json +++ b/package.json @@ -43,9 +43,9 @@ "ip": "^1.1.5", "jsonwebtoken": "^8.5.1", "libgen": "^2.1.0", - "njodb": "^0.4.27", - "node-ffprobe": "^3.0.0", + "njodb": "^0.4.29", "node-cron": "^3.0.0", + "node-ffprobe": "^3.0.0", "node-stream-zip": "^1.15.0", "podcast": "^1.3.0", "read-chunk": "^3.1.0", @@ -56,4 +56,4 @@ "xml2js": "^0.4.23" }, "devDependencies": {} -} \ No newline at end of file +} diff --git a/server/Db.js b/server/Db.js index b25cd54d..2c550cf1 100644 --- a/server/Db.js +++ b/server/Db.js @@ -258,7 +258,12 @@ class Db { } return entityDb.update((record) => record.id === entity.id, () => jsonEntity).then((results) => { - Logger.debug(`[DB] Updated ${entityName}: ${results.updated}`) + if (process.env.NODE_ENV !== 'production') { + Logger.debug(`[DB] Updated ${entityName}: ${results.updated} | Selected: ${results.selected}`) + } else { + Logger.debug(`[DB] Updated ${entityName}: ${results.updated}`) + } + var arrayKey = this.getEntityArrayKey(entityName) this[arrayKey] = this[arrayKey].map(e => { return e.id === entity.id ? entity : e