Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show chapters in ABS audiobook view #1928

Merged
merged 3 commits into from
Feb 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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