From 9eb0ec76fe4c017a73d7dae95d1ecad235e8b546 Mon Sep 17 00:00:00 2001 From: ic1415 <63030270+ic1415@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:48:41 -0400 Subject: [PATCH 1/2] Update LibraryItemController.js update library item controller to log downloaded ebooks to fix #3215 --- server/controllers/LibraryItemController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js index 5442097886..60d41b23b0 100644 --- a/server/controllers/LibraryItemController.js +++ b/server/controllers/LibraryItemController.js @@ -738,6 +738,8 @@ class LibraryItemController { return res.sendStatus(404) } const ebookFilePath = ebookFile.metadata.path + + Logger.info(`[LibraryItemController] User "${req.user.username}" requested download for item "${ebookFile.metadata.title}" at "${ebookFilePath}"`) if (global.XAccel) { const encodedURI = encodeUriPath(global.XAccel + ebookFilePath) From 2a69955cc1adfd79756668acc35ca899ff52c485 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 2 Aug 2024 16:30:21 -0500 Subject: [PATCH 2/2] Update server/controllers/LibraryItemController.js --- server/controllers/LibraryItemController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js index 60d41b23b0..af26415466 100644 --- a/server/controllers/LibraryItemController.js +++ b/server/controllers/LibraryItemController.js @@ -739,7 +739,7 @@ class LibraryItemController { } const ebookFilePath = ebookFile.metadata.path - Logger.info(`[LibraryItemController] User "${req.user.username}" requested download for item "${ebookFile.metadata.title}" at "${ebookFilePath}"`) + Logger.info(`[LibraryItemController] User "${req.user.username}" requested download for item "${req.libraryItem.media.metadata.title}" ebook at "${ebookFilePath}"`) if (global.XAccel) { const encodedURI = encodeUriPath(global.XAccel + ebookFilePath)