Audible: Add podcast support and browse by author/series/narrator (#2881)
authorZtripez <ztripez@vonmatern.org>
Wed, 14 Jan 2026 08:25:14 +0000 (09:25 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Jan 2026 08:25:14 +0000 (09:25 +0100)
commitce81dd83389503160a0a8bbdb3ee2ed7f9b1f803
treef708ef051fa8bd185f6a70cc889de4edafe0da2a
parenta9ca9bb27288a71698919f031be6d5cf7c6366ad
Audible: Add podcast support and browse by author/series/narrator (#2881)

* Fix Audible authentication for new API token format

- Add compatible token refresh handling for new actor_access_token format
- Validate signing auth availability (preferred, stable auth method)
- Accept multiple authorization code parameter names in callback URL
- Improve error handling and diagnostic messages

* Add podcast support to Audible provider

Implement podcast library sync and playback for Audible Plus content:
- Add LIBRARY_PODCASTS to supported features
- Implement get_library_podcasts() to fetch podcast series
- Implement get_podcast() for full podcast details
- Implement get_podcast_episodes() and get_podcast_episode()
- Add podcast and episode parsing functions
- Update get_stream() to handle podcast episodes (Mpeg drm_type)

Podcasts in Audible use "PodcastParent" content_delivery_type for series.
Episodes are fetched via the parent_asin relationship.
Podcast episodes use non-DRM MP3 streaming (drm_type: "Mpeg").

* Add browse support for authors, series, narrators, genres, publishers

Implement custom browse functionality to navigate audiobooks by:
- Authors: Browse all authors, see audiobooks sorted by release date (newest first)
- Series: Browse all series, see books in order (by sequence number)
- Narrators: Browse all narrators, see audiobooks sorted by release date
- Genres: Browse all genres, see audiobooks sorted by release date
- Publishers: Browse all publishers, see audiobooks sorted by release date

The base audiobooks/podcasts paths fall back to the parent implementation.
Data is extracted from the library API response.

* Clean up Audible helper comments and docstrings

* Address review comments for Audible PR #2881

- Refactor pagination into _fetch_library_items
- Implement ACR caching to optimize position reporting
- Fix podcast parent fallback
- Handle special characters in browse paths
- Add unit tests for new logic

---------

Co-authored-by: Ztripez von Matérn <ztripez@bobby.se>
music_assistant/providers/audible/__init__.py
music_assistant/providers/audible/audible_helper.py
music_assistant/providers/audiobookshelf/parsers.py
tests/providers/__init__.py [new file with mode: 0644]
tests/providers/test_audible.py [new file with mode: 0644]