|
@@ -57,7 +57,7 @@ class NCManageDatabase: NSObject {
|
|
|
let config = Realm.Configuration(
|
|
|
|
|
|
fileURL: dirGroup?.appendingPathComponent("\(appDatabaseNextcloud)/\(k_databaseDefault)"),
|
|
|
- schemaVersion: 20,
|
|
|
+ schemaVersion: 21,
|
|
|
|
|
|
|
|
|
|
|
@@ -70,6 +70,7 @@ class NCManageDatabase: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
migrationBlock: { migration, oldSchemaVersion in
|
|
|
|
|
@@ -1446,7 +1447,7 @@ class NCManageDatabase: NSObject {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @objc func setLocalFile(fileID: String, date: NSDate?, exifDate: NSDate?, exifLatitude: String?, exifLongitude: String?, fileName: String?) {
|
|
|
+ @objc func setLocalFile(fileID: String, date: NSDate?, exifDate: NSDate?, exifLatitude: String?, exifLongitude: String?, fileName: String?, etag: String?, etagFPE: String?) {
|
|
|
|
|
|
guard self.getAccountActive() != nil else {
|
|
|
return
|
|
@@ -1477,6 +1478,12 @@ class NCManageDatabase: NSObject {
|
|
|
if let fileName = fileName {
|
|
|
result.fileName = fileName
|
|
|
}
|
|
|
+ if let etag = etag {
|
|
|
+ result.etag = etag
|
|
|
+ }
|
|
|
+ if let etagFPE = etagFPE {
|
|
|
+ result.etagFPE = etagFPE
|
|
|
+ }
|
|
|
}
|
|
|
} catch let error {
|
|
|
print("[LOG] Could not write to database: ", error)
|
|
@@ -2230,6 +2237,7 @@ class NCManageDatabase: NSObject {
|
|
|
|
|
|
addObject.account = tableAccount.account
|
|
|
addObject.assetLocalIdentifier = metadataNet.assetLocalIdentifier
|
|
|
+ addObject.errorCode = metadataNet.errorCode
|
|
|
addObject.fileName = metadataNet.fileName
|
|
|
addObject.path = metadataNet.path
|
|
|
addObject.selector = metadataNet.selector
|
|
@@ -2273,6 +2281,7 @@ class NCManageDatabase: NSObject {
|
|
|
|
|
|
addObject.account = tableAccount.account
|
|
|
addObject.assetLocalIdentifier = metadataNet.assetLocalIdentifier
|
|
|
+ addObject.errorCode = metadataNet.errorCode
|
|
|
addObject.fileName = metadataNet.fileName
|
|
|
addObject.path = metadataNet.path
|
|
|
addObject.selector = metadataNet.selector
|
|
@@ -2312,6 +2321,7 @@ class NCManageDatabase: NSObject {
|
|
|
|
|
|
metadataNet.account = result.account
|
|
|
metadataNet.assetLocalIdentifier = result.assetLocalIdentifier
|
|
|
+ metadataNet.errorCode = result.errorCode
|
|
|
metadataNet.fileName = result.fileName
|
|
|
metadataNet.path = result.path
|
|
|
metadataNet.selector = result.selector
|
|
@@ -2378,6 +2388,7 @@ class NCManageDatabase: NSObject {
|
|
|
|
|
|
metadataNet.account = result.account
|
|
|
metadataNet.assetLocalIdentifier = result.assetLocalIdentifier
|
|
|
+ metadataNet.errorCode = result.errorCode
|
|
|
metadataNet.fileName = result.fileName
|
|
|
metadataNet.path = result.path
|
|
|
metadataNet.selector = result.selector
|