[PR #857] [MERGED] feat(server) Extend PUT /album/:id/assets endpoint (#857) #8791

Closed
opened 2026-02-05 13:53:18 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/857
Author: @matthinc
Created: 10/24/2022
Status: Merged
Merged: 10/28/2022
Merged by: @alextran1502

Base: mainHead: dev/album-try-add


📝 Commits (5)

  • 665712a Add new query parameter to API endpoint that allows adding assets to albums which potentially contain assets that are already part of this album.
  • 5edaebb Change API endpoint
  • 93289f5 Merge main
  • 24d9620 Generate new APIs
  • dc48a06 Fixed test

📊 Changes

18 files changed (+314 additions, -30 deletions)

View changed files

📝 .gitignore (+3 -1)
📝 mobile/openapi/.openapi-generator/FILES (+2 -2)
📝 mobile/openapi/README.md (+1 -0)
mobile/openapi/doc/AddAssetsResponseDto.md (+17 -0)
📝 mobile/openapi/doc/AlbumApi.md (+2 -2)
📝 mobile/openapi/lib/api.dart (+1 -0)
📝 mobile/openapi/lib/api/album_api.dart (+2 -2)
📝 mobile/openapi/lib/api_client.dart (+2 -0)
mobile/openapi/lib/model/add_assets_response_dto.dart (+138 -0)
mobile/openapi/test/add_assets_response_dto_test.dart (+37 -0)
📝 server/apps/immich/src/api-v1/album/album-repository.ts (+14 -3)
📝 server/apps/immich/src/api-v1/album/album.controller.ts (+2 -1)
📝 server/apps/immich/src/api-v1/album/album.service.spec.ts (+34 -9)
📝 server/apps/immich/src/api-v1/album/album.service.ts (+11 -5)
server/apps/immich/src/api-v1/album/response-dto/add-assets-response.dto.ts (+13 -0)
📝 server/immich-openapi-specs.json (+1 -1)
📝 web/src/api/open-api/api.ts (+27 -2)
📝 web/src/lib/components/album-page/album-viewer.svelte (+7 -2)

📄 Description

Situation: One tries to add assets to album which are already a part of the album
Current behavior: Fails with HTTP 500
New: Request always succeeds. The response contains information about failed assets.

{
  "successfullyAdded": 5,
  "alreadyInAlbum": ["id1", "id2"],
  "album": {...}
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/857 **Author:** [@matthinc](https://github.com/matthinc) **Created:** 10/24/2022 **Status:** ✅ Merged **Merged:** 10/28/2022 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `dev/album-try-add` --- ### 📝 Commits (5) - [`665712a`](https://github.com/immich-app/immich/commit/665712a7b2eba93aa56a2378b5a34c06bbb5865c) Add new query parameter to API endpoint that allows adding assets to albums which potentially contain assets that are already part of this album. - [`5edaebb`](https://github.com/immich-app/immich/commit/5edaebbdd61751dee2600276accda87167f66172) Change API endpoint - [`93289f5`](https://github.com/immich-app/immich/commit/93289f59f59d2467dd802695a46c11ea3a852cbb) Merge main - [`24d9620`](https://github.com/immich-app/immich/commit/24d9620342a0c2bea1072cb15f9826602d6b5116) Generate new APIs - [`dc48a06`](https://github.com/immich-app/immich/commit/dc48a06c09b2b38f2eb2940c00d92991fcfeb2d7) Fixed test ### 📊 Changes **18 files changed** (+314 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -1) 📝 `mobile/openapi/.openapi-generator/FILES` (+2 -2) 📝 `mobile/openapi/README.md` (+1 -0) ➕ `mobile/openapi/doc/AddAssetsResponseDto.md` (+17 -0) 📝 `mobile/openapi/doc/AlbumApi.md` (+2 -2) 📝 `mobile/openapi/lib/api.dart` (+1 -0) 📝 `mobile/openapi/lib/api/album_api.dart` (+2 -2) 📝 `mobile/openapi/lib/api_client.dart` (+2 -0) ➕ `mobile/openapi/lib/model/add_assets_response_dto.dart` (+138 -0) ➕ `mobile/openapi/test/add_assets_response_dto_test.dart` (+37 -0) 📝 `server/apps/immich/src/api-v1/album/album-repository.ts` (+14 -3) 📝 `server/apps/immich/src/api-v1/album/album.controller.ts` (+2 -1) 📝 `server/apps/immich/src/api-v1/album/album.service.spec.ts` (+34 -9) 📝 `server/apps/immich/src/api-v1/album/album.service.ts` (+11 -5) ➕ `server/apps/immich/src/api-v1/album/response-dto/add-assets-response.dto.ts` (+13 -0) 📝 `server/immich-openapi-specs.json` (+1 -1) 📝 `web/src/api/open-api/api.ts` (+27 -2) 📝 `web/src/lib/components/album-page/album-viewer.svelte` (+7 -2) </details> ### 📄 Description Situation: One tries to add assets to album which are already a part of the album Current behavior: Fails with HTTP 500 New: Request always succeeds. The response contains information about failed assets. ```json { "successfullyAdded": 5, "alreadyInAlbum": ["id1", "id2"], "album": {...} } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 13:53:18 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#8791