advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
5.52k stars 380 forks source link

[Bug]: Library's Series API Returning Empty Results Array #2975

Closed babatonga closed 2 weeks ago

babatonga commented 2 weeks ago

What happened?

When I try to fetch (GET) all series of a library I get an empty result: https://my-abs.tld/api/libraries/my-library-id/series

{
"results":[],
"total": 398,
"limit": 0,
"page": 0,
"sortDesc": false,
"minified": false,
"include": ""
}

What did you expect to happen?

Like documented in https://api.audiobookshelf.org/#get-a-library-39-s-series I expect that all series and their books will be shown as array in results.

Steps to reproduce the issue

  1. Send a GET request to described API endpoint (with Authorization in headers)
  2. Getting 200 response with empty results array

Audiobookshelf version

v2.9.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

No response

Additional Notes

I have tried several query parameters but got the same result

babatonga commented 2 weeks ago

I just tried it with a limit and page set, now it works. Even with just limit set to 398 it's working (but not if set to 0). So is there a hardoced limit or something like that if the response would be too big?

advplyr commented 2 weeks ago

The docs need to be updated since changing to the new database. A limit is now required and cannot be 0. Page is not required it will just default to the first page.

advplyr commented 2 weeks ago

I just updated the api docs. There are a few places it is out-of-date. We are working on auto-generated api docs but it will take some time.