feat: implement filtered book navigation and improve author sorting

- 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
This commit is contained in:
Claude 2025-11-20 16:43:21 +00:00
parent f60ea72659
commit 43712643a2
No known key found for this signature in database
6 changed files with 275 additions and 20 deletions

View file

@ -1,6 +1,9 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:shelfsdk/audiobookshelf_api.dart';
import 'package:vaani/api/library_browser_provider.dart';
import 'package:vaani/router/router.dart';
class LibrarySeriesPage extends HookConsumerWidget {
const LibrarySeriesPage({super.key});
@ -82,12 +85,13 @@ class SeriesListTile extends StatelessWidget {
: null,
trailing: const Icon(Icons.chevron_right),
onTap: () {
// TODO: Navigate to series detail page
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Tapped on ${series.name}'),
duration: const Duration(seconds: 1),
),
// Navigate to filtered items page with series filter
context.goNamed(
Routes.libraryFiltered.name,
extra: {
'filter': SeriesFilter(series.id),
'title': series.name,
},
);
},
),