[PR #4133] [MERGED] Adds the option to download selected books #4176

Closed
opened 2026-04-25 00:18:39 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4133
Author: @Vito0912
Created: 3/17/2025
Status: Merged
Merged: 3/18/2025
Merged by: @advplyr

Base: masterHead: feat/downloadMultiple


📝 Commits (7)

  • 0123dac download multiple items
  • 0a9a846 added download to frontend
  • 9b79aab logging
  • 3c9966e clean up
  • 1def32a Fix req.query check and response
  • ff36a93 Fix multiple download for podcasts & cleanup
  • 3b7db82 Update bulk download to not open in new tab

📊 Changes

4 files changed (+150 additions, -1 deletions)

View changed files

📝 client/components/app/Appbar.vue (+16 -0)
📝 server/controllers/LibraryController.js (+48 -1)
📝 server/routers/ApiRouter.js (+1 -0)
📝 server/utils/zipHelpers.js (+85 -0)

📄 Description

Brief summary

Adds a new endpoint that allows bulk downloading multiple library items and adds it to the frontend.

Which issue is fixed?

None directly, I think. But it comes close to #3541 and I believe this is the better approach instead of implementing an endpoint for Collections, Series, Authors, Playlists, etc.

In-depth Description

It fetches all the library items and their paths, puts them into one zip file.

Structure is like

ZIP
-- file.mp3
-- Book Folder Name/
---- file.mp3
---- file.epub

We are limited by GET to download the file as it has a 2000 character limit on most browsers. Since we can't send any request body, we have a limit of 40 IDs we can send to safely prevent any errors. Therefore, the download button is only shown for up to 40 books. But in theory, it would work with more.

How have you tested this?

Using my own library. Files in root directory, but also in non-root directories.

Screenshots

I don't have any with public domain works, but just imagine a download button under the three-dot menu when selecting multiple books in the library view.


🔄 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/4133 **Author:** [@Vito0912](https://github.com/Vito0912) **Created:** 3/17/2025 **Status:** ✅ Merged **Merged:** 3/18/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `feat/downloadMultiple` --- ### 📝 Commits (7) - [`0123dac`](https://github.com/advplyr/audiobookshelf/commit/0123dacb292ba73bbc9f8bfe73d2e94e82c1fadb) download multiple items - [`0a9a846`](https://github.com/advplyr/audiobookshelf/commit/0a9a846a332480eeb08bb8f999960e6432c16b99) added download to frontend - [`9b79aab`](https://github.com/advplyr/audiobookshelf/commit/9b79aab4d5b8604f8535d32340b965d65f665818) logging - [`3c9966e`](https://github.com/advplyr/audiobookshelf/commit/3c9966e84917196fac1578d5519662339effeb2a) clean up - [`1def32a`](https://github.com/advplyr/audiobookshelf/commit/1def32aa5053bb0a431920ffdcafb1aa29f7c1ab) Fix req.query check and response - [`ff36a93`](https://github.com/advplyr/audiobookshelf/commit/ff36a9327cab943672d053f857443fd89f0bd88b) Fix multiple download for podcasts & cleanup - [`3b7db82`](https://github.com/advplyr/audiobookshelf/commit/3b7db82bf0e2ff6679643589a8b4489655299cc3) Update bulk download to not open in new tab ### 📊 Changes **4 files changed** (+150 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `client/components/app/Appbar.vue` (+16 -0) 📝 `server/controllers/LibraryController.js` (+48 -1) 📝 `server/routers/ApiRouter.js` (+1 -0) 📝 `server/utils/zipHelpers.js` (+85 -0) </details> ### 📄 Description ## Brief summary Adds a new endpoint that allows bulk downloading multiple library items and adds it to the frontend. ## Which issue is fixed? None directly, I think. But it comes close to #3541 and I believe this is the better approach instead of implementing an endpoint for Collections, Series, Authors, Playlists, etc. ## In-depth Description It fetches all the library items and their paths, puts them into one zip file. Structure is like ``` ZIP -- file.mp3 -- Book Folder Name/ ---- file.mp3 ---- file.epub ``` We are limited by GET to download the file as it has a 2000 character limit on most browsers. Since we can't send any request body, we have a limit of 40 IDs we can send to safely prevent any errors. Therefore, the download button is only shown for up to 40 books. But in theory, it would work with more. ## How have you tested this? Using my own library. Files in root directory, but also in non-root directories. ## Screenshots I don't have any with public domain works, but just imagine a download button under the three-dot menu when selecting multiple books in the library view. --- <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:18:39 +02:00
adam closed this issue 2026-04-25 00:18:39 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4176