From b5dad38390c64395b7f144e9ca8eb05132e3f900 Mon Sep 17 00:00:00 2001 From: Fabian Munkes <105975993+fmunkes@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:35:07 +0100 Subject: [PATCH] add get parameters for consistency --- .../providers/audiobookshelf/abs_client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/music_assistant/providers/audiobookshelf/abs_client.py b/music_assistant/providers/audiobookshelf/abs_client.py index 6d0dd56d9..37598815a 100644 --- a/music_assistant/providers/audiobookshelf/abs_client.py +++ b/music_assistant/providers/audiobookshelf/abs_client.py @@ -172,11 +172,18 @@ async def get_all_podcasts(self) -> AsyncGenerator[ABSLibraryItemExpandedPodcast yield podcast async def _get_lib_items(self, lib: ABSLibrary) -> AsyncGenerator[bytes]: - """Get library items with pagination.""" + """Get library items with pagination. + + Note: + - minified=1 -> minified items. However, there appears to be + a bug in abs, so we always get minified items. Still there for + consistency + - collapseseries=0 -> even if books are part of a series, they will be single items + """ page_cnt = 0 while True: data = await self._get( - f"/libraries/{lib.id_}/items", + f"/libraries/{lib.id_}/items?minified=1&collapseseries=0", params={"limit": LIMIT_ITEMS_PER_PAGE, "page": page_cnt}, ) page_cnt += 1