[PR #3945] [CLOSED] Adding support for 'minified' parameter when fetching a library's items #4127

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3945
Author: @r0adkll
Created: 2/6/2025
Status: Closed

Base: masterHead: dh/fix-library-items-expanded


📝 Commits (3)

  • 7a03cbc Adding support for 'minified' parameter when fetching a library's items
  • 78384e5 Made fix less verbose
  • 0fc3b40 Made 'expanded' details an explicit parameter

📊 Changes

2 files changed (+14 additions, -2 deletions)

View changed files

📝 server/controllers/LibraryController.js (+1 -0)
📝 server/models/LibraryItem.js (+13 -2)

📄 Description

Brief summary

This PR attempts to fix the issue where the /api/libraries/<id>/items endpoint only returns minified library items.

Which issue is fixed?

Fixes #2123

In-depth Description

This endpoint currently just maps all library items toOldJSONMinified() regardless of the minified parameter sent in the request. This change checks the parameter and maps to either the minified, or the toOldJSONExpanded().

How have you tested this?

Tested by running locally through API test client with both response prior, and response after (with minified=1) and then with minified=0.

Also verified that change didn't affect web / mobile clients

Screenshots

n/a


🔄 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/3945 **Author:** [@r0adkll](https://github.com/r0adkll) **Created:** 2/6/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dh/fix-library-items-expanded` --- ### 📝 Commits (3) - [`7a03cbc`](https://github.com/advplyr/audiobookshelf/commit/7a03cbcc4450ba6244839fd04c5fe63b5f3c11e4) Adding support for 'minified' parameter when fetching a library's items - [`78384e5`](https://github.com/advplyr/audiobookshelf/commit/78384e57bf014868e2fed5151db66581197e702a) Made fix less verbose - [`0fc3b40`](https://github.com/advplyr/audiobookshelf/commit/0fc3b40b8eedf645de964b7b1feb944db5dedef8) Made 'expanded' details an explicit parameter ### 📊 Changes **2 files changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/controllers/LibraryController.js` (+1 -0) 📝 `server/models/LibraryItem.js` (+13 -2) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary <!-- Please provide a brief summary of what your PR attempts to achieve. --> This PR attempts to fix the issue where the `/api/libraries/<id>/items` endpoint only returns minified library items. ## Which issue is fixed? <!-- Which issue number does this PR fix? Ex: "Fixes #1234" --> Fixes #2123 ## In-depth Description <!-- Describe your solution in more depth. How does it work? Why is this the best solution? Does it solve a problem that affects multiple users or is this an edge case for your setup? --> This endpoint currently just maps all library items `toOldJSONMinified()` regardless of the `minified` parameter sent in the request. This change checks the parameter and maps to either the minified, or the `toOldJSONExpanded()`. ## How have you tested this? <!-- Please describe in detail with reproducible steps how you tested your changes. --> Tested by running locally through API test client with both response prior, and response after (with `minified=1`) and then with `minified=0`. Also verified that change didn't affect web / mobile clients ## Screenshots <!-- If your PR includes any changes to the web client, please include screenshots or a short video from before and after your changes. --> n/a --- <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:25 +02:00
adam closed this issue 2026-04-25 00:18:25 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4127