feat: implement library view with Authors, Genres, and Series browsing

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.
This commit is contained in:
Claude 2025-11-20 10:52:18 +00:00
parent 07aea41c6e
commit 53027bf74c
No known key found for this signature in database
7 changed files with 485 additions and 5 deletions

View file

@ -6,8 +6,6 @@ import 'package:vaani/features/you/view/widgets/library_switch_chip.dart'
show showLibrarySwitcher;
import 'package:vaani/router/router.dart' show Routes;
import 'package:vaani/shared/icons/abs_icons.dart' show AbsIcons;
import 'package:vaani/shared/widgets/not_implemented.dart'
show showNotImplementedToast;
class LibraryBrowserPage extends HookConsumerWidget {
const LibraryBrowserPage({super.key});
@ -48,7 +46,7 @@ class LibraryBrowserPage extends HookConsumerWidget {
leading: const Icon(Icons.person),
trailing: const Icon(Icons.chevron_right),
onTap: () {
showNotImplementedToast(context);
GoRouter.of(context).pushNamed(Routes.libraryAuthors.name);
},
),
ListTile(
@ -56,7 +54,7 @@ class LibraryBrowserPage extends HookConsumerWidget {
leading: const Icon(Icons.category),
trailing: const Icon(Icons.chevron_right),
onTap: () {
showNotImplementedToast(context);
GoRouter.of(context).pushNamed(Routes.libraryGenres.name);
},
),
ListTile(
@ -64,7 +62,7 @@ class LibraryBrowserPage extends HookConsumerWidget {
leading: const Icon(Icons.list),
trailing: const Icon(Icons.chevron_right),
onTap: () {
showNotImplementedToast(context);
GoRouter.of(context).pushNamed(Routes.librarySeries.name);
},
),
// Downloads