Fix all kinds of syncing errors

This commit is contained in:
ronaldheft
2022-08-13 12:41:20 -04:00
parent c029e519e9
commit e0e2f02e0b
6 changed files with 83 additions and 43 deletions
+4 -6
View File
@@ -157,13 +157,11 @@ public class AbsDatabase: CAPPlugin {
let localMediaProgressId = call.getString("localMediaProgressId")
do {
guard let localLibraryItemId = localLibraryItemId else {
call.reject("localLibraryItemId not specified")
return
}
guard let serverMediaProgress = serverMediaProgress else {
call.reject("serverMediaProgress not specified")
return
return call.reject("serverMediaProgress not specified")
}
guard localLibraryItemId != nil || localMediaProgressId != nil else {
return call.reject("localLibraryItemId or localMediaProgressId must be specified")
}
let localMediaProgress = LocalMediaProgress.fetchOrCreateLocalMediaProgress(localMediaProgressId: localMediaProgressId, localLibraryItemId: localLibraryItemId, localEpisodeId: localEpisodeId)