mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 01:54:33 +02:00
Handle download complete lifecycle
This commit is contained in:
parent
5495bcb945
commit
b549528e23
5 changed files with 62 additions and 9 deletions
|
@ -177,6 +177,12 @@ class Database {
|
|||
}
|
||||
}
|
||||
|
||||
public func removeDownloadItem(_ downloadItem: DownloadItem) {
|
||||
Database.realmQueue.sync {
|
||||
try! instance.write { instance.delete(downloadItem) }
|
||||
}
|
||||
}
|
||||
|
||||
public func getDeviceSettings() -> DeviceSettings {
|
||||
return Database.realmQueue.sync {
|
||||
return instance.objects(DeviceSettings.self).first ?? getDefaultDeviceSettings()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue