From 7e76eed8bbe4b901891424a557d4f039a45f1c88 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 16 Sep 2026 16:26:26 -0500 Subject: [PATCH] Update library item updateMedia endpoint to no longer accept ebookFile, chapters and audioFiles in req body --- server/models/Book.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/server/models/Book.js b/server/models/Book.js index 7e1a2e30c..19923750e 100644 --- a/server/models/Book.js +++ b/server/models/Book.js @@ -422,21 +422,6 @@ class Book extends Model { hasUpdates = true } - // TODO: Remove support for updating audioFiles, chapters and ebookFile here - const arrayOfObjectsKeys = ['audioFiles', 'chapters'] - arrayOfObjectsKeys.forEach((key) => { - if (Array.isArray(payload[key]) && !payload[key].some((item) => typeof item !== 'object') && JSON.stringify(this[key]) !== JSON.stringify(payload[key])) { - this[key] = payload[key] - this.changed(key, true) - hasUpdates = true - } - }) - if (payload.ebookFile && JSON.stringify(this.ebookFile) !== JSON.stringify(payload.ebookFile)) { - this.ebookFile = payload.ebookFile - this.changed('ebookFile', true) - hasUpdates = true - } - if (hasUpdates) { Logger.debug(`[Book] "${this.title}" changed keys:`, this.changed()) await this.save()