|
@@ -1878,9 +1878,6 @@ class NCManageDatabase: NSObject {
|
|
|
do {
|
|
|
try realm.write {
|
|
|
|
|
|
- var creationDate = ""
|
|
|
- var modificationDate = ""
|
|
|
-
|
|
|
for asset in assets {
|
|
|
|
|
|
let addRecord = tablePhotoLibrary()
|
|
@@ -1889,18 +1886,17 @@ class NCManageDatabase: NSObject {
|
|
|
addRecord.assetLocalIdentifier = asset.localIdentifier
|
|
|
addRecord.mediaType = asset.mediaType.rawValue
|
|
|
|
|
|
+ var creationDate = ""
|
|
|
+ var modificationDate = ""
|
|
|
+
|
|
|
if asset.creationDate != nil {
|
|
|
addRecord.creationDate = asset.creationDate! as NSDate
|
|
|
creationDate = String(describing: addRecord.creationDate!)
|
|
|
- } else {
|
|
|
- creationDate = ""
|
|
|
}
|
|
|
|
|
|
if asset.modificationDate != nil {
|
|
|
addRecord.modificationDate = asset.modificationDate! as NSDate
|
|
|
modificationDate = String(describing: addRecord.modificationDate!)
|
|
|
- } else {
|
|
|
- modificationDate = ""
|
|
|
}
|
|
|
|
|
|
addRecord.idAsset = "\(asset.localIdentifier)\(creationDate)\(modificationDate)"
|