progress on home screen

This commit is contained in:
Dr-Blank 2024-06-17 01:33:56 -04:00
parent 865a662b56
commit 479242427a
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
9 changed files with 333 additions and 124 deletions

View file

@ -1,11 +1,9 @@
import 'package:shelfsdk/audiobookshelf_api.dart';
extension LibraryItemConversion on LibraryItem {
LibraryItemExpanded get asExpanded =>
LibraryItemExpanded.fromJson(toJson());
LibraryItemExpanded get asExpanded => LibraryItemExpanded.fromJson(toJson());
LibraryItemMinified get asMinified =>
LibraryItemMinified.fromJson(toJson());
LibraryItemMinified get asMinified => LibraryItemMinified.fromJson(toJson());
}
extension MediaConversion on Media {
@ -46,3 +44,10 @@ extension ShelfConversion on Shelf {
SeriesShelf get asSeriesShelf => SeriesShelf.fromJson(toJson());
AuthorShelf get asAuthorShelf => AuthorShelf.fromJson(toJson());
}
extension UserConversion on User {
UserWithSessionAndMostRecentProgress
get asUserWithSessionAndMostRecentProgress =>
UserWithSessionAndMostRecentProgress.fromJson(toJson());
User get asUser => User.fromJson(toJson());
}