Skip to content

Commit

Permalink
fix: show chapters in ABS audiobook view (#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmunkes authored Feb 1, 2025
1 parent 780fde8 commit 5cbfb14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions music_assistant/providers/audiobookshelf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,13 @@ async def _parse_audiobook(
return mass_audiobook

async def get_library_audiobooks(self) -> AsyncGenerator[Audiobook, None]:
"""Get Audiobook libraries."""
"""Get Audiobook libraries.
We need the expanded version here to have chapters shown!
"""
async for abs_audiobook in self._client.get_all_audiobooks_minified():
mass_audiobook = await self._parse_audiobook(abs_audiobook)
abs_audiobook_expanded = await self._client.get_audiobook_expanded(abs_audiobook.id_)
mass_audiobook = await self._parse_audiobook(abs_audiobook_expanded)
yield mass_audiobook

async def get_audiobook(self, prov_audiobook_id: str) -> Audiobook:
Expand Down

0 comments on commit 5cbfb14

Please sign in to comment.