mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-30 15:17:14 +02:00
Update:iOS using new sync local sessions endpoint
- remove local session sync function call on starting playback - Add User model and getCurrentUser api function
This commit is contained in:
@@ -146,17 +146,16 @@ public class AbsDatabase: CAPPlugin {
|
||||
call.resolve()
|
||||
}
|
||||
|
||||
@objc func syncLocalMediaProgressWithServer(_ call: CAPPluginCall) {
|
||||
@objc func syncLocalSessionsWithServer(_ call: CAPPluginCall) {
|
||||
logger.log("syncLocalSessionsWithServer: Starting")
|
||||
guard Store.serverConfig != nil else {
|
||||
call.reject("syncLocalMediaProgressWithServer not connected to server")
|
||||
return
|
||||
call.reject("syncLocalSessionsWithServer not connected to server")
|
||||
return call.resolve()
|
||||
}
|
||||
ApiClient.syncMediaProgress { results in
|
||||
do {
|
||||
call.resolve(try results.asDictionary())
|
||||
} catch {
|
||||
call.reject("Failed to report synced media progress")
|
||||
}
|
||||
|
||||
Task {
|
||||
await ApiClient.syncLocalSessionsWithServer()
|
||||
call.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user