audiobookshelf/test/server/models
Conor Bronsdon 42c6798981 Apply minified serialization to books inside collections
The GET /api/libraries/:id/collections endpoint captured the minified
flag on the response payload but never passed it down to the book
serialization, so each book was always returned fully expanded with its
complete libraryFiles array and heavy media fields (audioFiles, chapters,
tracks). For libraries with multi-file audiobooks this produced responses
of tens of megabytes even when minified=1 was requested.

Thread the minified flag through getOldCollectionsJsonExpanded and
Collection.toOldJSONExpanded so that, when requested, books use the
existing library item minified form. Non-minified requests are unchanged.

Fixes #5170
2026-07-09 02:59:25 -07:00
..
Collection.test.js Apply minified serialization to books inside collections 2026-07-09 02:59:25 -07:00