fix(server): do not match live photos across libraries (#11952)

This commit is contained in:
Jason Rasmussen
2024-08-20 21:23:50 -04:00
committed by GitHub
parent fd225e7462
commit 29d229c5ba
4 changed files with 27 additions and 1 deletions

View File

@@ -363,12 +363,13 @@ export class AssetRepository implements IAssetRepository {
}
findLivePhotoMatch(options: LivePhotoSearchOptions): Promise<AssetEntity | null> {
const { ownerId, otherAssetId, livePhotoCID, type } = options;
const { ownerId, libraryId, otherAssetId, livePhotoCID, type } = options;
return this.repository.findOne({
where: {
id: Not(otherAssetId),
ownerId,
libraryId: libraryId || IsNull(),
type,
exifInfo: {
livePhotoCID,