fix(server): external library motion photo video asset handling (#8721)

* added "isExternal" to the getLibraryAssetPaths query

* handleQueueAssetRefresh skip "non external" video asset, closes #8562

* correctly implements live photo deletion for external library

* use "external asset" for external library tests

* minor: external library asset checksum is "path hash" not file hash

* renamed to getExternalLibraryAssetPaths and added isExternal where clause

* generated sql

* reverted leftover change
This commit is contained in:
Kevin Huang 2024-04-14 16:55:44 -07:00 committed by GitHub
parent a903898781
commit 85df3f1e99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 61 additions and 17 deletions

View file

@ -396,7 +396,10 @@ export class AssetService {
// TODO refactor this to use cascades
if (asset.livePhotoVideoId) {
await this.jobRepository.queue({ name: JobName.ASSET_DELETION, data: { id: asset.livePhotoVideoId } });
await this.jobRepository.queue({
name: JobName.ASSET_DELETION,
data: { id: asset.livePhotoVideoId, fromExternal },
});
}
const files = [asset.thumbnailPath, asset.previewPath, asset.encodedVideoPath];