1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

feat: remove from album action button (#19884)

* feat: remove from album action

* feat: remove from album action
This commit is contained in:
Alex
2025-07-11 10:06:53 -05:00
committed by GitHub
parent 1cc5ca14ca
commit 2b07d7ac63
7 changed files with 109 additions and 1 deletions

View File

@@ -31,6 +31,27 @@ class DriftAlbumApiRepository extends ApiRepository {
return responseDto.toRemoteAlbum();
}
Future<({List<String> removed, List<String> failed})> removeAssets(
String albumId,
Iterable<String> assetIds,
) async {
final response = await checkNull(
_api.removeAssetFromAlbum(
albumId,
BulkIdsDto(ids: assetIds.toList()),
),
);
final List<String> removed = [], failed = [];
for (final dto in response) {
if (dto.success) {
removed.add(dto.id);
} else {
failed.add(dto.id);
}
}
return (removed: removed, failed: failed);
}
}
extension on AlbumResponseDto {