You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Map view, the number of assets is a total of the number of albums the asset(s) appear(s) in.
For example, I have a single picture in four albums. On the Map, it shows as a number 4, and when I click it, the 'next' arrow will click forward as though there are four items, but it's the same image.
If I have one image in two albums and another image in four albums at the same location, the Map displays a 6, and when I click it, I will see the first image, but I must click 'next' twice to see the second image. The behavior seems to treat each album membership as a separate image, even though it is the same single image. If the first item is in four albums, I must click 'next' four times to get the next actual asset.
This behavior is consistent: however many albums an asset appears in is used as the count on the map and affects cycling through the items when viewing them.
The sample autogenerated query server/src/queries/map.repository.sql returns multiple rows per asset, one row for each album the asset is in.
This query works to return one row per unique asset when run against the database directly:
select distinct on ("assets"."id")
"id",
"exif"."latitude" as "lat",
"exif"."longitude" as "lon",
"exif"."city",
"exif"."state",
"exif"."country"
from
"assets"
inner join "exif" on "assets"."id" = "exif"."assetId"
and "exif"."latitude" is not null
and "exif"."longitude" is not null
left join "albums_assets_assets" on "assets"."id" = "albums_assets_assets"."assetsId"
where
"deletedAt" is null
order by
"assets"."id", "fileCreatedAt" desc
The bug
In Map view, the number of assets is a total of the number of albums the asset(s) appear(s) in.
For example, I have a single picture in four albums. On the Map, it shows as a number 4, and when I click it, the 'next' arrow will click forward as though there are four items, but it's the same image.
If I have one image in two albums and another image in four albums at the same location, the Map displays a 6, and when I click it, I will see the first image, but I must click 'next' twice to see the second image. The behavior seems to treat each album membership as a separate image, even though it is the same single image. If the first item is in four albums, I must click 'next' four times to get the next actual asset.
This behavior is consistent: however many albums an asset appears in is used as the count on the map and affects cycling through the items when viewing them.
The sample autogenerated query server/src/queries/map.repository.sql returns multiple rows per asset, one row for each album the asset is in.
This query works to return one row per unique asset when run against the database directly:
I think changes need to be made to https://github.com/immich-app/immich/blob/main/server/src/repositories/map.repository.ts to generate a query that returns only one row per asset.
The OS that Immich Server is running on
Synology Docker
Version of Immich Server
v1.126.1
Version of Immich Mobile App
NA
Platform with the issue
Your docker-compose.yml content
NA
Your .env content
Reproduction steps
Relevant log output
Additional information
No response
The text was updated successfully, but these errors were encountered: