mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-07 03:29:29 +00:00
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:
parent
bee1d233bf
commit
792448b0ef
6 changed files with 723 additions and 192 deletions
10
lib/shared/extensions/item_files.dart
Normal file
10
lib/shared/extensions/item_files.dart
Normal 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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue