Added performance optimizations to all library browser views:
- Added cacheExtent: 500 to all GridView/ListView builders to pre-render
items and reduce stuttering during scrolling
- Wrapped grid items in RepaintBoundary to isolate repaints and improve
performance
- Optimized CachedNetworkImage with:
- fadeInDuration/fadeOutDuration: Duration.zero to remove animation overhead
- memCacheHeight: 300 to limit in-memory cache size
- maxHeightDiskCache: 600 to resize images for better performance
These changes should significantly reduce the stuttering observed when
scrolling the authors grid and filtering books, especially on first load.
Navigation fixes:
- Change goNamed to pushNamed in all library browser pages
- Maintains proper back navigation stack
- Back button now goes step by step instead of to beginning
- Prevents app from closing when navigating back from book detail
Grid layout fixes:
- Book covers are now always square (1.0 aspect ratio)
- Overall card aspect ratio is 0.75 to provide space for text
- Wrap cover in AspectRatio widget instead of using Expanded
- Ensures title and author info always visible below covers
- Fixes issue where book info was missing in series view
- Sort authors by surname (last word in name) instead of first name
- Create FilteredLibraryItemsPage to display books filtered by author/genre/series
- Add navigation from authors/genres/series pages to filtered book lists
- Use AuthorFilter, GenreFilter, and SeriesFilter from shelfsdk
- Add libraryFiltered route with filter parameter support
Users can now:
- Browse authors sorted by surname
- Tap on an author to see all their books
- Tap on a genre to see all books in that genre
- Tap on a series to see all books in that series
- Fix genres error by parsing JSON manually to avoid Series deserialization
- Fix series blank screen by using SimpleSeries class instead of full Series
- Add alphabetical sorting to authors page
- Work around shelfsdk Series variant detection issues
The Audiobookshelf API returns Series objects that don't match any of the
variant detection patterns in the shelfsdk SeriesConverter. Since we can't
modify the external shelfsdk, we parse the API responses manually to extract
only the data we need for display.
Fix compilation errors in library browser views:
- Use serverUrl instead of url on AudiobookShelfServer model
- Use authToken instead of token on AuthenticatedUser model
- Add all required variant handlers to Series.maybeMap call
These changes align with the actual model definitions in the codebase.
This commit implements a comprehensive library browsing feature:
- Add LibraryBrowserProvider with providers for authors, genres, and series data
- Create LibraryAuthorsPage with grid view of authors including images and book counts
- Create LibraryGenresPage with list view of all genres
- Create LibrarySeriesPage with list view of series and book counts
- Update LibraryBrowserPage navigation to route to the new views
- Add routes for /browser/authors, /browser/genres, and /browser/series
- Replace "Not Implemented" toasts with functional navigation
The implementation uses the Audiobookshelf API via shelfsdk to fetch:
- Authors list with metadata (getAuthors)
- Genres from library filter data (getFilterData)
- Series with pagination support (getSeries)
All views follow Material Design 3 patterns and include proper loading/error states.