feat: downloads support (#22)

* feat: enhance download manager with improved logging and task handling

* feat: add total size calculation for library items and improve download manager functionality

* refactor: simplify parameters in queueAudioBookDownload and improve logging message in deleteDownloadedItem
This commit is contained in:
Dr.Blank 2024-09-22 22:05:28 -04:00 committed by GitHub
parent bee1d233bf
commit 792448b0ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 723 additions and 192 deletions

View file

@ -0,0 +1,10 @@
import 'package:shelfsdk/audiobookshelf_api.dart';
extension TotalSize on LibraryItemExpanded {
int get totalSize {
return libraryFiles.fold(
0,
(previousValue, element) => previousValue + element.metadata.size,
);
}
}