mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 21:08:43 +02:00
Starting logic for handling completed downloads
This commit is contained in:
@@ -46,6 +46,14 @@ extension DownloadItem {
|
||||
self.itemTitle = libraryItem.media.metadata.title
|
||||
self.media = libraryItem.media
|
||||
}
|
||||
|
||||
func isDoneDownloading() -> Bool {
|
||||
self.downloadItemParts.allSatisfy({ $0.completed })
|
||||
}
|
||||
|
||||
func didDownloadSuccessfully() -> Bool {
|
||||
self.downloadItemParts.allSatisfy({ $0.failed = false })
|
||||
}
|
||||
}
|
||||
|
||||
struct DownloadItemPart: Realmable, Codable {
|
||||
|
||||
Reference in New Issue
Block a user