[Bug]: With v2.4.0, GETting all library items with no limit returns empty results array #1357

Closed
opened 2026-04-24 23:41:06 +02:00 by adam · 1 comment
Owner

Originally created by @mihailim on GitHub (Sep 9, 2023).

Describe the issue

Since v2.4.0, trying to issue Get a Library's Items API call without any limit returns an empty results[] array, despite returning the correct total.

This can be worked around by specifying a very large limit and either ommitting the page number or asking for page 0, but it's a surprising breaking change.

Steps to reproduce the issue

  1. curl "https://abs.example.com/api/libraries/LIBRARYIDHERE/items" -H "Authorization: Bearer TOKENHERE"
    yields:
    {"results":[],"total":2031,"limit":0,"page":0,"sortDesc":false,"mediaType":"book","minified":false,"collapseseries":false,"include":"","offset":0}
  2. By contrast, curl "https://abs.example.com/api/libraries/LIBRARYIDHERE/items?limit=99999" -H "Authorization: Bearer TOKENHERE"
    yields:
    {"results":[ <elided all the 2031 correct results here> ],"total":2031,"limit":0,"page":0,"sortDesc":false,"mediaType":"book","minified":false,"collapseseries":false,"include":"","offset":0}

The behavior is the same, empty results, when trying with varying other query parameters. Only limit seems to work.

Audiobookshelf version

v2.4.0

How are you running audiobookshelf?

Docker

Originally created by @mihailim on GitHub (Sep 9, 2023). ### Describe the issue Since v2.4.0, trying to issue [Get a Library's Items API call](https://github.com/advplyr/audiobookshelf-slate/blob/main/source/includes/_libraries.md#get-a-librarys-items) without any limit returns an empty `results[]` array, despite returning the correct `total`. This can be worked around by specifying a very large limit and either ommitting the page number or asking for page 0, but it's a surprising breaking change. ### Steps to reproduce the issue 1. `curl "https://abs.example.com/api/libraries/LIBRARYIDHERE/items" -H "Authorization: Bearer TOKENHERE"` yields: `{"results":[],"total":2031,"limit":0,"page":0,"sortDesc":false,"mediaType":"book","minified":false,"collapseseries":false,"include":"","offset":0}` 1. By contrast, `curl "https://abs.example.com/api/libraries/LIBRARYIDHERE/items?limit=99999" -H "Authorization: Bearer TOKENHERE"` yields: `{"results":[ <elided all the 2031 correct results here> ],"total":2031,"limit":0,"page":0,"sortDesc":false,"mediaType":"book","minified":false,"collapseseries":false,"include":"","offset":0}` The behavior is the same, empty results, when trying with varying other query parameters. Only `limit` seems to work. ### Audiobookshelf version v2.4.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:41:06 +02:00
adam closed this issue 2026-04-24 23:41:07 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 10, 2023):

Fixed in v2.4.1

@advplyr commented on GitHub (Sep 10, 2023): Fixed in [v2.4.1](https://github.com/advplyr/audiobookshelf/releases/tag/v2.4.1)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1357