mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
fix(server): hide isFavorite from album asset sync stream (#28923)
* fix(server): hide isFavorite from album asset sync stream * some tests * Revert "some tests" This reverts commit3242e6961c. * alter existing test to clear test's intent * Reapply "some tests" This reverts commitf1d4c47f5f. * drop one * sql
This commit is contained in:
parent
b846afeb08
commit
d10153bbc7
5 changed files with 121 additions and 33 deletions
|
|
@ -69,7 +69,6 @@ select
|
|||
"asset"."localDateTime",
|
||||
"asset"."type",
|
||||
"asset"."deletedAt",
|
||||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
|
|
@ -78,15 +77,19 @@ select
|
|||
"asset"."width",
|
||||
"asset"."height",
|
||||
"asset"."isEdited",
|
||||
case
|
||||
when "asset"."ownerId" = $1 then "asset"."isFavorite"
|
||||
else $2
|
||||
end as "isFavorite",
|
||||
"album_asset"."updateId"
|
||||
from
|
||||
"album_asset" as "album_asset"
|
||||
inner join "asset" on "asset"."id" = "album_asset"."assetId"
|
||||
where
|
||||
"album_asset"."updateId" < $1
|
||||
and "album_asset"."updateId" <= $2
|
||||
and "album_asset"."updateId" >= $3
|
||||
and "album_asset"."albumId" = $4
|
||||
"album_asset"."updateId" < $3
|
||||
and "album_asset"."updateId" <= $4
|
||||
and "album_asset"."updateId" >= $5
|
||||
and "album_asset"."albumId" = $6
|
||||
order by
|
||||
"album_asset"."updateId" asc
|
||||
|
||||
|
|
@ -103,7 +106,6 @@ select
|
|||
"asset"."localDateTime",
|
||||
"asset"."type",
|
||||
"asset"."deletedAt",
|
||||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
|
|
@ -112,16 +114,20 @@ select
|
|||
"asset"."width",
|
||||
"asset"."height",
|
||||
"asset"."isEdited",
|
||||
case
|
||||
when "asset"."ownerId" = $1 then "asset"."isFavorite"
|
||||
else $2
|
||||
end as "isFavorite",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset" as "asset"
|
||||
inner join "album_asset" on "album_asset"."assetId" = "asset"."id"
|
||||
inner join "album_user" on "album_user"."albumId" = "album_asset"."albumId"
|
||||
where
|
||||
"asset"."updateId" < $1
|
||||
and "asset"."updateId" > $2
|
||||
and "album_asset"."updateId" <= $3
|
||||
and "album_user"."userId" = $4
|
||||
"asset"."updateId" < $3
|
||||
and "asset"."updateId" > $4
|
||||
and "album_asset"."updateId" <= $5
|
||||
and "album_user"."userId" = $6
|
||||
order by
|
||||
"asset"."updateId" asc
|
||||
|
||||
|
|
@ -139,7 +145,6 @@ select
|
|||
"asset"."localDateTime",
|
||||
"asset"."type",
|
||||
"asset"."deletedAt",
|
||||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
|
|
@ -147,15 +152,19 @@ select
|
|||
"asset"."libraryId",
|
||||
"asset"."width",
|
||||
"asset"."height",
|
||||
"asset"."isEdited"
|
||||
"asset"."isEdited",
|
||||
case
|
||||
when "asset"."ownerId" = $1 then "asset"."isFavorite"
|
||||
else $2
|
||||
end as "isFavorite"
|
||||
from
|
||||
"album_asset" as "album_asset"
|
||||
inner join "asset" on "asset"."id" = "album_asset"."assetId"
|
||||
inner join "album_user" on "album_user"."albumId" = "album_asset"."albumId"
|
||||
where
|
||||
"album_asset"."updateId" < $1
|
||||
and "album_asset"."updateId" > $2
|
||||
and "album_user"."userId" = $3
|
||||
"album_asset"."updateId" < $3
|
||||
and "album_asset"."updateId" > $4
|
||||
and "album_user"."userId" = $5
|
||||
order by
|
||||
"album_asset"."updateId" asc
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue