You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR expands the AudiobookShelf browsing experience so users are no longer limited to a flat list of titles.
The main goal is to make the existing AudiobookShelf integration feel closer to the server's native browsing capabilities by adding support for browsing by Series, Collections, Authors, and Narrators, while preserving the existing book-list and detail flows.
This change also refactors the AudiobookShelf navigation and data flow so the same UI stack can handle:
top-level AudiobookShelf libraries
browse categories within a library
filtered book lists
collection contents
existing audiobook detail views
Bugfix
Not a bugfix branch.
Related tasks
Feature request: improve AudiobookShelf browsing beyond a flat title list
Requested support for:
search
series
collections
authors
narrators
Approach
The general approach was to extend the current AudiobookShelf integration instead of creating a separate parallel flow.
Navigation and screen model
Added richer AudiobookShelf route/source modeling so a single library screen can represent multiple kinds of content:
AudiobookShelfLibraryLevelData
AudiobookShelfLibraryViewSource
AudiobookShelfBrowseCategory
AudiobookShelfItemFilter
This allows the same AudiobookShelfLibraryView / AudiobookShelfLibraryViewModel stack to render:
library list
browse-category list
filtered books
entity lists
collection contents
Service/API updates
Extended AudiobookShelfConnectionService with support for additional AudiobookShelf endpoints and filtering behavior:
fetchFilterData(in:)
fetchCollections(in:)
fetchCollection(id:)
fetchItems(..., filter:)
The AudiobookShelf integration now uses:
/api/libraries
/api/libraries/{id}/filterdata
/api/libraries/{id}/collections
/api/collections/{id}
/api/libraries/{id}/items?filter=...
UI updates
Updated the existing AudiobookShelf list/grid flows to support more than just books and libraries by expanding AudiobookShelfLibraryItem.Kind to include:
browseCategory
series
collection
author
narrator
The existing row/grid views were reused and adjusted so these new item types can:
display appropriate placeholder icons
show subtitles where useful
navigate correctly
avoid enabling download-selection behavior for non-book entities
Search and browsing behavior
The existing search behavior for books remains in place.
New entity/category screens use local filtering where appropriate, while book-library screens continue to use the current AudiobookShelf search endpoint and filtered item fetches.
Things to be aware of / Things to focus on
This PR is focused on AudiobookShelf audiobook libraries. Podcast-specific browsing was not expanded in the same way.
The feature relies on AudiobookShelf server metadata being present in filterdata and collections responses. If a server/library has sparse metadata, some categories may naturally appear empty.
The implementation intentionally reuses the existing AudiobookShelf screen stack rather than introducing a separate feature-specific UI flow.
Things to review:
Navigation behavior between libraries, browse categories, filtered books, and details
Correctness of AudiobookShelf filter encoding in AudiobookShelfItemFilter.queryValue
Behavior of search, sorting, and pagination across the new screen sources
Whether the current UX for single-library auto-navigation is desirable
Whether collection and entity placeholder artwork behavior is acceptable for a first pass
Hi @HoChiPants ! thanks for the PR!, I've been looking into it and testing it, and I think we can improve on it by instead of having the intermediate screen with the navigation options, we do it with tabs for the different options, so it more closely resembles ABS navigation too, what do you think?
My bad @HoChiPants , I should have been more specific, I meant tabs like in the toolbar at the bottom, like how the Files app shows up from within BookPlayer
LETS GO! more than happy to do some more features if there is stuff you guys want.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR expands the
AudiobookShelfbrowsing experience so users are no longer limited to a flat list of titles.The main goal is to make the existing AudiobookShelf integration feel closer to the server's native browsing capabilities by adding support for browsing by
Series,Collections,Authors, andNarrators, while preserving the existing book-list and detail flows.This change also refactors the AudiobookShelf navigation and data flow so the same UI stack can handle:
Bugfix
Not a bugfix branch.
Related tasks
searchseriescollectionsauthorsnarratorsApproach
The general approach was to extend the current AudiobookShelf integration instead of creating a separate parallel flow.
Navigation and screen model
Added richer AudiobookShelf route/source modeling so a single library screen can represent multiple kinds of content:
AudiobookShelfLibraryLevelDataAudiobookShelfLibraryViewSourceAudiobookShelfBrowseCategoryAudiobookShelfItemFilterThis allows the same
AudiobookShelfLibraryView/AudiobookShelfLibraryViewModelstack to render:Service/API updates
Extended
AudiobookShelfConnectionServicewith support for additional AudiobookShelf endpoints and filtering behavior:fetchFilterData(in:)fetchCollections(in:)fetchCollection(id:)fetchItems(..., filter:)The AudiobookShelf integration now uses:
/api/libraries/api/libraries/{id}/filterdata/api/libraries/{id}/collections/api/collections/{id}/api/libraries/{id}/items?filter=...UI updates
Updated the existing AudiobookShelf list/grid flows to support more than just books and libraries by expanding
AudiobookShelfLibraryItem.Kindto include:browseCategoryseriescollectionauthornarratorThe existing row/grid views were reused and adjusted so these new item types can:
Search and browsing behavior
The existing search behavior for books remains in place.
New entity/category screens use local filtering where appropriate, while book-library screens continue to use the current AudiobookShelf search endpoint and filtered item fetches.
Things to be aware of / Things to focus on
AudiobookShelfaudiobook libraries. Podcast-specific browsing was not expanded in the same way.filterdataandcollectionsresponses. If a server/library has sparse metadata, some categories may naturally appear empty.Things to review:
AudiobookShelfItemFilter.queryValuesearch, sorting, and pagination across the new screen sourcesScreenshots