From ddc54c8811a00bbfb604f93b2c9693cdc63eaacc Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 15 Jul 2023 13:39:12 -0500 Subject: [PATCH] Update:Downloading library item shows log on the server with username #1461 --- server/controllers/LibraryItemController.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js index 0d78e06a5d..5ecd7c3b71 100644 --- a/server/controllers/LibraryItemController.js +++ b/server/controllers/LibraryItemController.js @@ -88,7 +88,9 @@ class LibraryItemController { } const libraryItemPath = req.libraryItem.path - const filename = `${req.libraryItem.media.metadata.title}.zip` + const itemTitle = req.libraryItem.media.metadata.title + Logger.info(`[LibraryItemController] User "${req.user.username}" requested download for item "${itemTitle}" at "${libraryItemPath}"`) + const filename = `${itemTitle}.zip` zipHelpers.zipDirectoryPipe(libraryItemPath, filename, res) }