refactor: update cover image handling to use item IDs and simplify library item actions

This commit is contained in:
Dr-Blank 2024-09-23 03:55:32 -04:00
parent d25d23a0b7
commit 405d625cdc
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
15 changed files with 305 additions and 362 deletions

View file

@ -13,7 +13,7 @@ part 'library_item_provider.g.dart';
final _logger = Logger('LibraryItemProvider');
/// provides the library item for the given id
@riverpod
@Riverpod(keepAlive: true)
class LibraryItem extends _$LibraryItem {
@override
Stream<shelfsdk.LibraryItemExpanded> build(String id) async* {
@ -22,7 +22,7 @@ class LibraryItem extends _$LibraryItem {
_logger.fine('LibraryItemProvider fetching library item: $id');
// ! this is a mock delay
// await Future.delayed(const Duration(seconds: 10));
// await Future.delayed(const Duration(seconds: 150));
// look for the item in the cache
final key = CacheKey.libraryItem(id);