From d2fe2c097267743c13e5dcd96fc38e30f6529557 Mon Sep 17 00:00:00 2001 From: onevcat Date: Fri, 27 Oct 2023 22:34:25 +0900 Subject: [PATCH] Use the correct local file cache key for AVAsset data provider --- Sources/General/ImageSource/AVAssetImageDataProvider.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/General/ImageSource/AVAssetImageDataProvider.swift b/Sources/General/ImageSource/AVAssetImageDataProvider.swift index 313eab8d0..7dc35ff73 100644 --- a/Sources/General/ImageSource/AVAssetImageDataProvider.swift +++ b/Sources/General/ImageSource/AVAssetImageDataProvider.swift @@ -53,7 +53,10 @@ public struct AVAssetImageDataProvider: ImageDataProvider { public let time: CMTime private var internalKey: String { - return (assetImageGenerator.asset as? AVURLAsset)?.url.absoluteString ?? UUID().uuidString + guard let url = (assetImageGenerator.asset as? AVURLAsset)?.url else { + return UUID().uuidString + } + return url.cacheKey } /// The cache key used by `self`.