mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 21:08:43 +02:00
Somewhat working progress under heavy load
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user