Support local media progress

This commit is contained in:
ronaldheft
2022-08-11 16:26:32 -04:00
parent a107a25e43
commit 64707b0928
3 changed files with 15 additions and 1 deletions
+9 -1
View File
@@ -114,9 +114,17 @@ public class AbsDatabase: CAPPlugin {
@objc func getLocalLibraryItemsInFolder(_ call: CAPPluginCall) {
call.resolve([ "value": [] ])
}
@objc func getAllLocalMediaProgress(_ call: CAPPluginCall) {
call.resolve([ "value": [] ])
do {
call.resolve([ "value": try Database.shared.getAllLocalMediaProgress().asDictionaryArray() ])
} catch {
NSLog("Error while loading local media progress")
debugPrint(error)
call.resolve(["value": []])
}
}
@objc func updateDeviceSettings(_ call: CAPPluginCall) {
let disableAutoRewind = call.getBool("disableAutoRewind") ?? false
let enableAltView = call.getBool("enableAltView") ?? false