diff --git a/ios/App/App/plugins/AbsDatabase.swift b/ios/App/App/plugins/AbsDatabase.swift index e08ee0d9..e7ed178c 100644 --- a/ios/App/App/plugins/AbsDatabase.swift +++ b/ios/App/App/plugins/AbsDatabase.swift @@ -87,7 +87,7 @@ public class AbsDatabase: CAPPlugin { @objc func getLocalLibraryItem(_ call: CAPPluginCall) { do { - let item = Database.shared.getLocalLibraryItemByLLId(libraryItem: call.getString("id") ?? "") + let item = Database.shared.getLocalLibraryItem(localLibraryItem: call.getString("id") ?? "") switch item { case .some(let foundItem): call.resolve(try foundItem.asDictionary()) diff --git a/ios/App/Shared/models/LocalLibrary.swift b/ios/App/Shared/models/LocalLibrary.swift index 3be6c823..52d908c3 100644 --- a/ios/App/Shared/models/LocalLibrary.swift +++ b/ios/App/Shared/models/LocalLibrary.swift @@ -9,7 +9,7 @@ import Foundation import RealmSwift class LocalLibraryItem: Object, Encodable { - @Persisted(primaryKey: true) var id: String = UUID().uuidString + @Persisted(primaryKey: true) var id: String = "local_\(UUID().uuidString)" @Persisted var basePath: String = "" @Persisted var absolutePath: String = "" @Persisted var contentUrl: String