[PR #1521] Added functionality to rename book folders. #3564

Open
opened 2026-04-25 00:16:09 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/1521
Author: @yuuzhan
Created: 2/20/2023
Status: 🔄 Open

Base: masterHead: master


📝 Commits (6)

📊 Changes

12 files changed (+643 additions, -149 deletions)

View changed files

📝 client/components/modals/item/tabs/Tools.vue (+21 -0)
📝 client/pages/audiobook/_id/manage.vue (+247 -140)
📝 client/pages/config/index.vue (+22 -0)
📝 client/store/index.js (+5 -0)
📝 client/strings/en-us.json (+9 -0)
📝 server/Server.js (+2 -0)
📝 server/controllers/ToolsController.js (+36 -0)
server/managers/LibraryItemFolderManager.js (+266 -0)
📝 server/objects/LibraryItem.js (+4 -7)
📝 server/objects/metadata/BookMetadata.js (+25 -2)
📝 server/objects/settings/ServerSettings.js (+3 -0)
📝 server/routers/ApiRouter.js (+3 -0)

📄 Description

Added a defaultRenameFormat setting on the server. This item is returned when fetching server settings to be displayed by clients and updated as appropriate.
Two api endpoints added:

/api/tools/item/[ID]/renameFolder?includeSampleTemplate=1&strFormat=$bookName. includeSampleTemplate(optional) will return a object with each supported format string, and what it would process to for the existing entity.

the GET method for the above endpoint will just return what would happen if you did rename, without actually altering anything. the POST of the method will execute the rename. Logic exists to check if target folder exists, or is a subfolder of another book. Will fail gracefully if so.

Added client code to interact with the above endpoints.

image
image
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/1521 **Author:** [@yuuzhan](https://github.com/yuuzhan) **Created:** 2/20/2023 **Status:** 🔄 Open **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`8ccaec3`](https://github.com/advplyr/audiobookshelf/commit/8ccaec3d9f0fca20f24802ca61ddbc318593c810) Added functionality to rename book folders. - [`1cdb0a4`](https://github.com/advplyr/audiobookshelf/commit/1cdb0a445f75b17c28314af6a0a8eedd15f703ed) Merge branch 'advplyr:master' into master - [`f8def38`](https://github.com/advplyr/audiobookshelf/commit/f8def38321ee17c82b3c5566f6a3ef073b15c176) coverPath bug fix on external rename - [`6bf99ca`](https://github.com/advplyr/audiobookshelf/commit/6bf99ca6add16565753e74875a92b17ed42d3ccf) Merge branch 'master' of https://github.com/yuuzhan/audiobookshelf - [`b3f9a40`](https://github.com/advplyr/audiobookshelf/commit/b3f9a40f18296eaaf657be75e3bd0d42c59948f8) Merge remote-tracking branch 'upstream/master' - [`c9813e2`](https://github.com/advplyr/audiobookshelf/commit/c9813e20c0417b1b23ef81fbc70151c6ca5ba049) refactored code so compatible with latest release ### 📊 Changes **12 files changed** (+643 additions, -149 deletions) <details> <summary>View changed files</summary> 📝 `client/components/modals/item/tabs/Tools.vue` (+21 -0) 📝 `client/pages/audiobook/_id/manage.vue` (+247 -140) 📝 `client/pages/config/index.vue` (+22 -0) 📝 `client/store/index.js` (+5 -0) 📝 `client/strings/en-us.json` (+9 -0) 📝 `server/Server.js` (+2 -0) 📝 `server/controllers/ToolsController.js` (+36 -0) ➕ `server/managers/LibraryItemFolderManager.js` (+266 -0) 📝 `server/objects/LibraryItem.js` (+4 -7) 📝 `server/objects/metadata/BookMetadata.js` (+25 -2) 📝 `server/objects/settings/ServerSettings.js` (+3 -0) 📝 `server/routers/ApiRouter.js` (+3 -0) </details> ### 📄 Description Added a defaultRenameFormat setting on the server. This item is returned when fetching server settings to be displayed by clients and updated as appropriate. Two api endpoints added: /api/tools/item/[ID]/renameFolder?includeSampleTemplate=1&strFormat=$bookName. includeSampleTemplate(optional) will return a object with each supported format string, and what it would process to for the existing entity. the GET method for the above endpoint will just return what would happen if you did rename, without actually altering anything. the POST of the method will execute the rename. Logic exists to check if target folder exists, or is a subfolder of another book. Will fail gracefully if so. Added client code to interact with the above endpoints. ![image](https://user-images.githubusercontent.com/4114975/220148247-79b1112f-4511-475d-8154-09aafa16ac9b.png) ![image](https://user-images.githubusercontent.com/4114975/220148345-cf82e530-f428-46b1-ba54-3e3dc8f17bf3.png) ![image](https://user-images.githubusercontent.com/4114975/220148505-4f357f4a-c9bd-4a69-9e43-768575f08679.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:09 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3564