mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-02 09:04:40 +02:00
Somewhat working progress under heavy load
This commit is contained in:
parent
ad802c16ea
commit
b1b10e846d
2 changed files with 42 additions and 16 deletions
|
@ -120,7 +120,7 @@ class Database {
|
|||
|
||||
public func saveLocalLibraryItem(localLibraryItem: LocalLibraryItem) {
|
||||
let realm = try! Realm()
|
||||
try! realm.write { realm.add(localLibraryItem) }
|
||||
try! realm.write { realm.add(localLibraryItem, update: .modified) }
|
||||
}
|
||||
|
||||
public func getDownloadItem(downloadItemId: String) -> DownloadItem? {
|
||||
|
@ -140,7 +140,7 @@ class Database {
|
|||
|
||||
public func saveDownloadItem(_ downloadItem: DownloadItem) {
|
||||
let realm = try! Realm()
|
||||
return try! realm.write { realm.add(downloadItem) }
|
||||
return try! realm.write { realm.add(downloadItem, update: .modified) }
|
||||
}
|
||||
|
||||
public func updateDownloadItemPart(_ part: DownloadItemPart) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue