mirror of
https://github.com/immich-app/immich.git
synced 2026-03-07 02:27:23 +03:00
feat(server, web): include pictures of shared albums on map (#7439)
* feat(server, web): include pictures of shared albums on map * run prettier * re-create api clients * implement suggestions from code review * shared from partner -> shared from partners * rename to 'include shared partner assets' * chore: fix tsc error in server and prettier in web * fix: include assets shared via owner albums --------- Co-authored-by: Zack Pollard <zackpollard@ymail.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d121903b38
commit
48927f5fb9
@@ -490,9 +490,24 @@ export class AssetRepository implements IAssetRepository {
|
||||
});
|
||||
}
|
||||
|
||||
async getMapMarkers(ownerIds: string[], options: MapMarkerSearchOptions = {}): Promise<MapMarker[]> {
|
||||
async getMapMarkers(
|
||||
ownerIds: string[],
|
||||
albumIds: string[],
|
||||
options: MapMarkerSearchOptions = {},
|
||||
): Promise<MapMarker[]> {
|
||||
const { isArchived, isFavorite, fileCreatedAfter, fileCreatedBefore } = options;
|
||||
|
||||
const where = {
|
||||
isVisible: true,
|
||||
isArchived,
|
||||
exifInfo: {
|
||||
latitude: Not(IsNull()),
|
||||
longitude: Not(IsNull()),
|
||||
},
|
||||
isFavorite,
|
||||
fileCreatedAt: OptionalBetween(fileCreatedAfter, fileCreatedBefore),
|
||||
};
|
||||
|
||||
const assets = await this.repository.find({
|
||||
select: {
|
||||
id: true,
|
||||
@@ -504,17 +519,10 @@ export class AssetRepository implements IAssetRepository {
|
||||
longitude: true,
|
||||
},
|
||||
},
|
||||
where: {
|
||||
ownerId: In([...ownerIds]),
|
||||
isVisible: true,
|
||||
isArchived,
|
||||
exifInfo: {
|
||||
latitude: Not(IsNull()),
|
||||
longitude: Not(IsNull()),
|
||||
},
|
||||
isFavorite,
|
||||
fileCreatedAt: OptionalBetween(fileCreatedAfter, fileCreatedBefore),
|
||||
},
|
||||
where: [
|
||||
{ ...where, ownerId: In([...ownerIds]) },
|
||||
{ ...where, albums: { id: In([...albumIds]) } },
|
||||
],
|
||||
relations: {
|
||||
exifInfo: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user