mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +02:00
fix: live photos not playing in shared links/albums (#3008)
This commit is contained in:
parent
6ae5d11ec0
commit
add5219d34
@ -40,6 +40,21 @@ export class AccessRepository implements IAccessRepository {
|
|||||||
id: assetId,
|
id: assetId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// still part of a live photo is in an album
|
||||||
|
{
|
||||||
|
ownerId: userId,
|
||||||
|
assets: {
|
||||||
|
livePhotoVideoId: assetId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sharedUsers: {
|
||||||
|
id: userId,
|
||||||
|
},
|
||||||
|
assets: {
|
||||||
|
livePhotoVideoId: assetId,
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -75,10 +90,9 @@ export class AccessRepository implements IAccessRepository {
|
|||||||
},
|
},
|
||||||
|
|
||||||
hasSharedLinkAccess: async (sharedLinkId: string, assetId: string): Promise<boolean> => {
|
hasSharedLinkAccess: async (sharedLinkId: string, assetId: string): Promise<boolean> => {
|
||||||
return (
|
return this.sharedLinkRepository.exist({
|
||||||
// album asset
|
where: [
|
||||||
(await this.sharedLinkRepository.exist({
|
{
|
||||||
where: {
|
|
||||||
id: sharedLinkId,
|
id: sharedLinkId,
|
||||||
album: {
|
album: {
|
||||||
assets: {
|
assets: {
|
||||||
@ -86,17 +100,29 @@ export class AccessRepository implements IAccessRepository {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})) ||
|
{
|
||||||
// individual asset
|
|
||||||
(await this.sharedLinkRepository.exist({
|
|
||||||
where: {
|
|
||||||
id: sharedLinkId,
|
id: sharedLinkId,
|
||||||
assets: {
|
assets: {
|
||||||
id: assetId,
|
id: assetId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}))
|
// still part of a live photo is in a shared link
|
||||||
);
|
{
|
||||||
|
id: sharedLinkId,
|
||||||
|
album: {
|
||||||
|
assets: {
|
||||||
|
livePhotoVideoId: assetId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: sharedLinkId,
|
||||||
|
assets: {
|
||||||
|
livePhotoVideoId: assetId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user