feat: add adjustmentTimestamp to platformasset

This commit is contained in:
shenlong-tanwen
2025-09-20 00:33:23 +05:30
parent 1e0b4fac04
commit d3646b2eab
6 changed files with 36 additions and 5 deletions
@@ -12,7 +12,8 @@ extension PHAsset {
height: Int64(pixelHeight),
durationInSeconds: Int64(duration),
orientation: 0,
isFavorite: isFavorite
isFavorite: isFavorite,
adjustmentTimestamp: adjustmentTimestamp
)
}
@@ -23,6 +24,10 @@ extension PHAsset {
var filename: String? {
return value(forKey: "filename") as? String
}
var adjustmentTimestamp: Int64 {
return (value(forKey: "adjustmentTimestamp") as? Date?).map( {Int64($0?.timeIntervalSince1970 ?? 0)} ) ?? 0
}
// This method is expected to be slow as it goes through the asset resources to fetch the originalFilename
var originalFilename: String? {